New reserved words  Chapter 3: New Features in Adaptive Server 12.5.2 and 12.5.3

Chapter 2: System Changes in Adaptive Server Version 15.0

New or changed global variables

Table 2-16 summarizes the global variables for the server limits of logins, users, and groups

Table 2-16: New global variables

Name of variable

What it displays

Value

@@rowcount

Enhanced to display the number of rows moved by a cursor, scrollable or nonscrollable.

In a nonscrollable cursor, the rows are fetched from the underlying tables to the client.

In a scrollable cursor, the rows counted are fetched from the current result set, not from the underlying tables.

The value of the global variable @@rowcount is affected by the specified cursor type.

The default, non-scrollable cursor moves forward one row at a time; the maximum value is the number of rows in the result set.

In a scrollable cursor the value of continues to increment, whatever the direction of the fetch command; there is no maximum value.

@@fetch_status

The status of a fetch command used for a scrollable cursor.

0 – fetch statement successfully executed.

-1 – either the fetch statement failed, or the row requested is outside the result set.

-2 – value reserved.

@@cursor_rows

The total number of rows in the cursor result set.

0 – No cursors are open, or no rows qualify for the last open cursor.

-1 – Semi-sensitive and scrollable, but the scrolling worktable is not yet populated. The number of rows that qualify the cursor is unknown.

n – The last opened or fetched cursor result set is fully populated; the value returned is the total number of rows in the result set.





Copyright © 2005. Sybase Inc. All rights reserved. Chapter 3: New Features in Adaptive Server 12.5.2 and 12.5.3

View this book as PDF