After the establishment of a cursor, you can use system procedures for the management of cursors, the system process of cursors are mainly as follows: Sp_cursor_list, sp_describe_cursor, Sp_describe_cursor_tables, sp_ Describe_cursor_columns.
The specific meanings of each system process are:
13.8.1 sp_cursor_list
A cursor and its attributes that appear in the current scope, with a command format of:
Example 13-11: From the example below, the reader can understand the specific use of the system process.
tip: because sp_cursor_list is a system procedure with cursor type variable @cursor_return and output reserved word, the result set in cursor variable @cursor_return and pub_ The result set in the CUR cursor is different.
13.8.2 sp_describe_cursor
The property used to display the cursor, and its command format is:
Tip:the command format for Sp_descride_cursor_tables and Sp_describe_cursor_columms is the same as the sp_describe_cursor command format.
See the full set of "MS SQL Basics Tutorials"