那么如果有下列事件
1. 你插入数据
2. 别人插入数据
3. 你读取标识值使用scope_identity()得到1的结果
@@identity,得到2的结果推荐你使用scope_identity()
1. 你插入数据
2. 别人插入数据
3. 你读取标识值使用scope_identity()得到1的结果
@@identity,得到2的结果推荐你使用scope_identity()
begin tran
insert into
set @temp = @@identity
commit tran