Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary key question
Message
From
21/06/2000 12:42:46
 
 
To
21/06/2000 10:24:51
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00382680
Message ID:
00382772
Views:
15
Check out the ALTER TABLE command. You're looking for the creation of a PRIMARY KEY constraint.

ALTER TABLE table
ADD CONSTRAINT PK_table PRIMARY KEY (column1)

I don't think that you can assign the IDENTITY property to an existing column. You may have to create the column under a new name, drop the original column, and then rename the new column to the original.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform