As per read committed isolation level on wiki
Read committed
In this isolation level, a lock-based concurrency control DBMS implementation keeps write locks (acquired on selected data) until the end of the transaction, but read locks are released as soon as the SELECT operation is performed
As per above statement it looks like , whenever any update statement is exceute whether its on whole table (codesnippet 1) or selected range(codesnippet 2), read committed isolation level will keep the lock till commit
codesnippet 1
begin tran
update Employee set category = "permanent"
...
end tran // lock will be released here
codesnippet 2
begin tran
update Employee set category = "permanent" where id =1
...
end tran // lock will be released here
Section 2:-
But as per Isolation Levels vs Lock Duration
section on the same link looks like in case of update on selected range
will cause the lock to be relaesed once update is executed . It won't
wait till transaction ened
begin tran
update Employee set category = "permanent" where id =1
// lock will be released here
........
end tran
My question is section 2 correct or section 1?