set transaction isolation level repeatable read
BEGIN TRAN Tran_Money
select * from CodeType rowlock where CodeTypeID = 'AcceptmentState'
UPDATE CodeType SET Memo = '222' WHERE CodeTypeID = 'AcceptmentState'
--rollback
COMMIT TRAN
开启一个事务,锁死一行 当不执行commit的时候 行处于锁死状态,当执行commit 之后 行解开
当事务需要rollback 的时候 也会把锁解开