sqlserver select @@IDENTITY 返回id 错误 问题 select @@IDENTITY 在表中有 inserted 触发器的时候 返回的 id 是错误的 解决办法 :使用 select SCOPE_IDENTITY() 代替即可