@@CURSOR_ROWS
cursor state
What changes
- Input
- last opened cursor
- Output or change
- row count
- Return type
- int
Syntax at a glance
@@CURSOR_ROWS
Work example
Inspect how many rows an existing cursor reports in its result set.
Test empty, one-row, and multi-row results. Read fetch status immediately and verify cleanup paths.
Check your work Cursor type affects this value, so compare it with fetch status and declared options.
Open Microsoft Learn for full syntax, permissions, and details for your version.