create table test (
id int not null IDENTITY(1,1), --这里
a char(20) not null
)
go alter table test1 add id int not null IDENTITY(1,1) --这里
goselect IDENTITY(int,1,1) as id,* into test2 --这里
from test3
order by a
go
id int not null IDENTITY(1,1), --这里
a char(20) not null
)
go alter table test1 add id int not null IDENTITY(1,1) --这里
goselect IDENTITY(int,1,1) as id,* into test2 --这里
from test3
order by a
go
再选下面为自增