declare @Id int set @Id = IDENT_CURRENT('一个表名') print(@id) -- 输出最后插入的那条记录的自增ID
参考:http://msdn.microsoft.com/zh-cn/library/ms175098.aspx
posted on 2011-09-23 10:19 JRoger 阅读(176) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 JRoger Powered by .NET 8.0 on Kubernetes