【 tulaoshi.com - SQLServer 】
在建立一个游标之后,便可利用系统过程对游标进行管理管理,游标的系统过程主要有以下几个:sp_cursor_list、sp_describe_cursor、 sp_describe_cursor_tables 、sp_describe_cursor_columns。
各系统过程的具体含义分别为:
13.8.1 sp_cursor_list
显示在当前作用域内的游标及其属性;其命令格式为:

例13-11: 从下面的例子中,读者能够体会该系统过程的具体使用方法。


(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/sqlserver/)提示:由于sp_cursor_list是一个含有游标类型变量@cursor_return,且有OUTPUT保留字的系统过程,游标变量@cursor_return中的结果集与pub_cur游标中的结果集是不同的。
13.8.2 sp_describe_cursor
用来显示游标的属性;其命令格式为:

(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/sqlserver/)提示:sp_descride_cursor_tables和sp_describe_cursor_columms的命令格式与sp_describe_cursor的命令格式一样。