Record Locking

  • There is a select statement followed by a update statement that needs to run. The problem is that no user should be allowed to run the select statement if there is any other select statement that has run and the update statement has not been run for the same. Please can u suggest a locking type and also give the SQL code for that.

  • You need to create a transaction, around the two statements, with the correct isolation level for your business case. See the SQL Books Online "Isolation Levels"

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply