How To Create Table with Identity Column

前端 未结 4 1790
深忆病人
深忆病人 2020-11-27 17:18

I have an existing table that I am about to blow away because I did not create it with the ID column set to be the table\'s Identity column.

Using

4条回答
  •  醉话见心
    2020-11-27 17:52

    [id] [int] IDENTITY(1,1) NOT NULL,
    

    of course since you're creating the table in SQL Server Management Studio you could use the table designer to set the Identity Specification.

    enter image description here

提交回复
热议问题