Cursor Stored Procedures

SQL Server provides a number of cursor-related stored procedures with which you should familiarize yourself if you expect to work with cursors much. Table 14.3 provides a brief list of them, along with a description of each.

Each of these returns its result via a cursor output parameter, so you'll need to supply a local cursor variable in order to process them.

Table 14.3. Stored Procedures Related to Cursors
ProcedureFunction
sp_cursor_listReturns a list of the cursors and their attributes that have been opened by a connection
sp_describe_cursorLists the attributes of an individual cursor
sp_describe_cursor_columnsLists the columns (and their attributes) returned by a cursor
sp_describe_cursor_tablesReturns a list of the tables referenced by a cursor

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.96.247