CURSORVariables in Stored Procedures
Another method available in SQL Server 2008 for passing cursor result sets between stored procedures is using the cursor data type. The cursor data type can be used to bind a cursor result set to a local variable, and that variable can then be used to manage and access the cursor result set. Cursor variables can be referenced in any of the cursor management statements:
A stored procedure can pass cursor variables as output parameters only; cursor variables cannot be passed as input parameters. When defining a
CURSOR output parameter, you must also specify the
When assigning a cursor to a cursor variable, you must use the
SET command because an assignment ...