try:
ALTER TABLE table1 ADD temp_id INT IDENTITYSET IDENTITY_INSERT table1  ONupdate table1 set temp_id=字段1insert into table1 select * from table1 where 序号=1 or 序号=2SET IDENTITY_INSERT table1 OFFALTER TABLE table1 DROP COLUMN 字段1 exec sp_rename 'table1.[temp_id]','字段1','column'

解决方案 »

  1.   

    按你的意思更改如下:
    ALTER TABLE 表 ADD 编号1 bigint identity(100005,1) not nullSET IDENTITY_INSERT table1  ONupdate table1 set temp_id=字段1insert into table1 select * from table1 where 序号=1 or 序号=2SET IDENTITY_INSERT table1 OFFALTER TABLE table1 DROP COLUMN 字段1 exec sp_rename 'table1.[temp_id]','字段1','column'
      

  2.   

    select * into 新表 from 表 where 字段1=(select  min(字段1) from 表 as aa where aa.字段2=表.字段2)
      

  3.   

    insert 表 select 字段1+1,字段2 from 表
      

  4.   

    主要问题是该表的字段有70来个,因此觉得
    insert 表 select 字段1+1,字段2 from 表
    这种方法比较麻烦