MS SQL Basics Tutorial: Using system procedures to manage cursors

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.