insert into tablename values(...)
select @@identity
本文介绍了一种在SQL中使用insert语句结合select @@identity来获取刚插入记录的ID的方法。这对于需要跟踪或关联刚创建的数据条目非常有用。
insert into tablename values(...)
select @@identity
411

被折叠的 条评论
为什么被折叠?