lapucca
asked on
TSQL syntax for adding a new column and making it a primay key as well.
Hi, Does this look about right?
ALTER TABLE dbo.q_degree_type(
ADD [DegreeTypeId] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PK_degree_type] PRIMARY KEY CLUSTERED
(
[DegreeTypeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE dbo.q_degree_type(
ADD [DegreeTypeId] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PK_degree_type] PRIMARY KEY CLUSTERED
(
[DegreeTypeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER