Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server
Closes and deallocates the cursor, and releases all associated resources; that is, it drops the temporary table used in support of KEYSET
or STATIC
cursor. sp_cursorclose
is invoked by specifying ID = 9
in a tabular data stream (TDS) packet.
Transact-SQL syntax conventions
sp_cursorclose cursor
[ ; ]
Important
Arguments for extended stored procedures must be entered in the specific order as described in the Syntax section. If the parameters are entered out of order, an error message occurs.
A cursor handle value generated by SQL Server and returned by the sp_cursoropen
procedure. The cursor parameter is int and can't be NULL
.
An input value of -1
applies toward all cursors on the current connection.
cursor will return error messages if the procedure was run after the cursor was closed, or if an invalid handle is specified.
RPC status indicates overall success or failure.
DONE
rowcount is always 0
.
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!