Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary key question
Message
De
21/06/2000 12:42:46
 
 
À
21/06/2000 10:24:51
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00382680
Message ID:
00382772
Vues:
17
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform