Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which type of SQL Server cursor concurrency places an update lock on a row when the row is read?

  • A.READ_ONLY
  • B.SCROLL_LOCK
  • C.OPTIMISTIC
  • D.READCOMMITTED

Answer: D

Correct answer: SCROLL_LOCK

SCROLL_LOCK is the pessimistic setting: an update lock is taken as each row is read and held while the cursor is positioned there, so no one else can change the row before the application decides what to do with it. OPTIMISTIC takes no lock until the update is attempted, and READ_ONLY takes none at all.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.