我想随便一个表,我想给这个表加一个ID列,但不用identity()函数去into 到另一个表,能够直接在本表添加。
请高手们指点
------解决方案--------------------
create table test(col int)
insert test select 1
union all select 2
alter table test add id int identity(1,1)
select * from test
------解决方案--------------------
alter table test add id int identity(1,1)
------解决方案--------------------
alter table test add id int identity(1,1)