我有一个现有的表,因为我没有创建它并将ID
列设置为表的标识列,所以我将要删除它。
使用SQL Server Management Studio,我编写了现有表的“创建到...”脚本并得到了这个:
CREATE TABLE [dbo].[History](
[ID] [int] NOT NULL,
[RequestID] [int] NOT NULL,
[EmployeeID] [varchar](50) NOT NULL,
[DateStamp] [datetime] NOT NULL,
CONSTRAINT [PK_History] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
我的问题是,我将如何修改它SQL
以便我的结果表将ID
列设置为Identity?