How to change programmatically non-identity column to identity one?

后端 未结 5 1952
终归单人心
终归单人心 2021-01-21 02:27

I have a table with column ID that is identity one. Next I create new non-identity column new_ID and update it with values from ID column + 1. Like this:

new_ID         


        
5条回答
  •  遥遥无期
    2021-01-21 02:55

    Guessing you didn't have much luck with your task....

    In table design, you should be able to go into properties and under Identity Specification change (Is Identity) to Yes and assign the column primary key if it formerly had the primary key.

提交回复
热议问题