SQL Server Cursors Question:
Explain the cursor lock types?
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
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
Previous Question | Next Question |
How to avoid cursors? | Explain Temporary table VS Table variable by using Cursor alternative? |