Some tips for using SQL Server 2019 cursors Try to avoid using SQL Server cursors, whenever possible. SQL Server cursors can results in some performance degradation in comparison with select statements. Try to use correlated subquery or derived tables, if you need to perform row-by-row operations. Use READ ONLY cursors, whenever possible, instead of updatable cursors. Because using cursors can...
Tag: FORWARD_ONLY
Tips for using SQL Server 2016 cursors
Tips for using SQL Server 2016 cursors Reduce the number of rows to process in the cursor. To reduce the cursor result set use the WHERE clause in the cursor’s select statement. Do not forget to close SQL Server 2016 cursor when its result set is not needed. To close SQL Server cursor, you can use CLOSE {cursor_name} command. This […]