Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Locking in “Read Committed Snapshot”

$
0
0
IF update command is run on a table with "Read Committed_Snapshot" isolation level and Commit is pending

eg: 

1)   update table1 set col1 = col1 + 1 where PKcol < 3


2)   update table1 set col1 = col1 + 1 where PKcol = 3


3)   update table1 set col1 = col1 + 1 where NonPKcol < 3


4)   update table1 set col1 = col1 + 1 where NonPKcol = 3


5)   update table1 set col1 = col1 + 1 where PKcol < 3 and NonPKcol = 5

(In above case PKcol is primary key in table and NonPKcol is a non-primary key)

then whether Update is locked for only rows satisfying 'where' condition ? (is it based on value or index or Primary column ?)

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>