Cursor Functions in SQL Server
These scalar functions return information about cursors.All cursor functions are nondeterministic. In other words, cursor functions do not always return the same results each time they execute, even with the same set of input values.
All the functios are listed below:
Function | Description |
---|---|
@@CURSOR_ROWS | This returns the number of qualifying rows currently in the last cursor opened on the connection.@@CURSOR_ROWS can be called to determine that the number of the rows that qualify for a cursor are retrieved at the time of the @@CURSOR_ROWS call. |
Syntax:
@@CURSOR_ROWS
Function | Description |
---|---|
@@FETCH_STATUS | This function returns the status of the last cursor FETCH statement issued against any cursor currently opened by the connection. |
Syntax:
@@FETCH_STATUS
Function | Description |
---|---|
CURSOR_STATUS | For a given parameter, CURSOR_STATUS shows whether or not a cursor declaration has returned a cursor and result set. |
Syntax:
CURSOR_STATUS
(
{ 'local' , 'cursor_name' }
| { 'global' , 'cursor_name' }
| { 'variable' , 'cursor_variable' }
)
SQL Server Connection String Formats
posted on 2019-08-27 05:53:53 - SQL Server Tutorials