SQL Server, How to set auto increment after creating a table without data loss?

后端 未结 7 1632
天涯浪人
天涯浪人 2020-11-22 09:54

I have a table table1 in SQL server 2008 and it has records in it.

I want the primary key table1_Sno column to be an auto-incrementing col

7条回答
  •  孤街浪徒
    2020-11-22 10:45

    If you want to do this via the designer you can do it by following the instructions here "Save changes is not permitted" when changing an existing column to be nullable

提交回复
热议问题