SQL Server Cursors Question:
Download Questions PDF

Explain the cursor lock types?

MS SQL Server Cursors Interview Question
MS SQL Server Cursors Interview Question

Answer:

Three types of locks

READ ONLY: This prevents any updates on the table.
SCROLL LOCK: This allows you to make changes to the table.
OPTIMISTIC: This checks if any change in the table record since the row fetched before updating.
If there is no change, the cursor can update

Download MS SQL Server Cursors Interview Questions And Answers PDF

Previous QuestionNext Question
How to avoid cursors?Explain Temporary table VS Table variable by using Cursor alternative?