如下:
create table test (
id int identity(1,1),
name varchar(20)
)
insert into test values('test)
select @@identity