| title | Cursors (Transact-SQL) | |||
|---|---|---|---|---|
| description | Cursors (Transact-SQL) | |||
| author | rwestMSFT | |||
| ms.author | randolphwest | |||
| ms.date | 03/16/2017 | |||
| ms.service | sql | |||
| ms.subservice | t-sql | |||
| ms.topic | reference | |||
| ms.custom |
|
|||
| helpviewer_keywords |
|
|||
| dev_langs |
|
|||
| monikerRange | =azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric-sqldb |
[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance Fabricsqldb]
[!INCLUDEmsCoName] [!INCLUDEssNoVersion] statements produce a complete result set, but there are times when the results are best processed one row at a time. Opening a cursor on a result set allows processing the result set one row at a time. You can assign a cursor to a variable or parameter with a cursor data type.
Cursor operations are supported on these statements:
These system functions and system stored procedures also support cursors: