Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constraint on 2 fields
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01096008
Message ID:
01096022
Vues:
12
You can do it either in the Enterprise Manager (EM) or using ALTER TABLE command if table already exists or CREATE TABLE otherwise.


>Consider the following table structure:
>Id uniqueidentifier
>ControlId bigint
>Number tinyint
>field_0 varchar(10)
>field_1 varchar(10)
>.
>.
>field_n varchar(10)
>
>The Id field is my PK, but I would also like to add a unique constraint on the "combination" of the fields ControlId and Number. How can I do this? Please let me know if what I am asking is very unclear.
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform