--1 如何锁一个表的某一行--A 连接中执行SETTRANSACTIONISOLATIONLEVELREPEATABLEREADbegintranselect*from tablename with (rowlock) where id=3waitfor delay ’00:00:05’
committran--B连接中如果执行update tablename set colname=’10’ where id=3--则要等待5秒update tablename set colname=’10’ where id<>3--可立即执行