Auto increment primary key in SQL Server Management Studio 2012

前端 未结 11 1214
谎友^
谎友^ 2020-11-22 10:11

How do I auto increment the primary key in a SQL Server database table, I\'ve had a look through the forum but can\'t see how.

11条回答
  •  滥情空心
    2020-11-22 10:43

    Be carefull like if you want the ID elements to be contigius or not. As SQLSERVER ID can jump by 1000 .

    Examle: before restart ID=11 after restart , you insert new row in the table, then the id will be 1012.

提交回复
热议问题