Instead of Cursor what can be used to perform row by row operation there by increasing performance?
-
Corelated Subquery
-
Index
-
TOP()
-
None
A
Correct answer
Explanation
Correlated subqueries can often replace row-by-row cursor operations and significantly improve performance. Cursors are slow because they process one row at a time with frequent context switching. A correlated subquery executes set-based operations which are optimized by the query engine. Indexes (option B) improve data access but don't replace row-by-row logic. TOP() (option C) returns a specified number of rows but doesn't perform row-by-row operations.