sp_cursorprepexec
Compiles a plan for the submitted cursor statement or batch, then creates and populates the cursor.
What changes
- Input
- Not stated in the Microsoft summary.
- Output or change
- Not stated in the Microsoft summary.
Syntax at a glance
sp_cursorprepexec prepared handle OUTPUT , cursor OUTPUT , params , statement , options
[ , scrollopt [ , ccopt [ , rowcount ] ] ]
[ , '@parameter_name [ , ...n ]' ]
Work example
Compiles a plan for the submitted cursor statement or batch, then creates and populates the cursor.
Read the parameter list and identify the provider operation it supports. Do not call it directly from application T-SQL.
Check your work Why does Microsoft limit direct calls to this procedure?
Open Microsoft Learn for full syntax, permissions, and details for your version.