Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Limiting entries into the column
Message
 
 
À
28/02/2003 13:31:26
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00759382
Message ID:
00759564
Vues:
17
>>If my field can be either Y or N, how can I specify it? Or if the field can be only one of 3 predefined values?
>
>Do you want to limit the column to only containing one of those discrete values? If so, you'll want to add a CHECK constraint to the table:
>
>CREATE TABLE mytable (
> gender nchar(1) CHECK(gender IN ('m', 'f'))
>...
>)
>

Can I do it in designer? I already created tables...

I put it in designer, but it doesn't look, like it was created. E.g. in the script of table Creation I don't see it. Is it correct to do in table designer managing constraints?
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