Cursor Functions



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:

FunctionDescription
@@CURSOR_ROWSThis 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  

FunctionDescription
@@FETCH_STATUSThis function returns the status of the last cursor FETCH statement issued against any cursor currently opened by the connection.
Syntax:

@@FETCH_STATUS  

FunctionDescription
CURSOR_STATUSFor 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' }   
     )  

Connection String

SQL Server Connection String Formats

posted on 2019-08-27 05:53:53 - SQL Server Tutorials


UNION

union in SQL server

posted on 2019-08-09 23:05:33 - SQL Server Tutorials


System Functions

System Functions in SQL Server

posted on 2019-08-09 06:14:33 - SQL Server Tutorials


Prompt Examples

ChatGPT Prompt Examples

posted on 2023-06-21 22:37:19 - ChatGPT Tutorials


Use Cases

Chat GPT Key Use Cases

posted on 2023-06-21 21:03:17 - ChatGPT Tutorials


Prompt Frameworks

Prompt Frameworks

posted on 2023-06-21 19:33:06 - ChatGPT Tutorials