Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can constraint include column value?
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01481419
Message ID:
01481425
Vues:
23
>Hi,
>
>When setting up table unique constraint I wanted to have a column value as part of the expression but don't seem to see how to do it in SSMS. For example, say I want the constraint to be on column MyColumn1 plus MyColumn2='1'. Can this be done?
>
>TIA.

There doesn't seem to be a way to do this in the design view. You need to do this in code - specify unique constraint on both columns.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform