hudeya 发表于 2016-11-8 11:55:53

sql server中得到刚插入记录对应的自增列的值

如下:  create table test (
id int identity(1,1),
name varchar(20)
)
  insert intotest values('test)
select @@identity
  
  
页: [1]
查看完整版本: sql server中得到刚插入记录对应的自增列的值