34,591
社区成员
发帖
与我相关
我的任务
分享
--测试
create table tb(id int identity(1,1),col varchar(20))
insert into tb select 'FF-00001'
insert into tb select 'FF-04501'
insert into tb select 'FF-04121'
select @@identity result
/*
result
--------
3
*/
drop table tb
--inid 自增長的列名
select top 1 inid from tb order by inid desc