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 ?)
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 ?)