Auto increment primary key in SQL Server Management Studio 2012

前端 未结 11 1268
谎友^
谎友^ 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:42

    Expand your database, expand your table right click on your table and select design from dropdown. ITlooks like this

    Now go Column properties below of it scroll down and find Identity Specification, expand it and you will find Is Identity make it Yes. Now choose Identity Increment right below of it give the value you want to increment in it. enter image description here

提交回复
热议问题