例:
declare @dt table
( _id int identity(1,1),
_name char(10)
)
insert into @dt (_name) values('zhang')
insert into @dt (_name) values('zhu')
insert into @dt (_name) values('liuchunmei')
select * from @dt where _id=scope_identity()
--Results : _id _name( _id int identity(1,1),
_name char(10)
)
insert into @dt (_name) values('zhang')
insert into @dt (_name) values('zhu')
insert into @dt (_name) values('liuchunmei')
select * from @dt where _id=scope_identity()
---------------------------
3 liuchunmei