Subject | Re: check and constraint/// |
---|---|
Author | Raúl Alberto Valencia Najarro |
Post date | 2004-02-26T19:38:13Z |
Yes. You can define constraints in the domain. For doing it, you
should use the VALUE reserved word.
For example:
CREATE DOMAIN gender AS VARCHAR(6) CHECK (VALUE = 'male' OR VALUE
= 'female').
Best regards,
Raúl.
--- In firebird-support@yahoogroups.com, "akestion" <akestion@y...>
wrote:
should use the VALUE reserved word.
For example:
CREATE DOMAIN gender AS VARCHAR(6) CHECK (VALUE = 'male' OR VALUE
= 'female').
Best regards,
Raúl.
--- In firebird-support@yahoogroups.com, "akestion" <akestion@y...>
wrote:
> hello all,Z]
>
>
> What's the best way to deals with those constraint :
>
> create domain Plantype as VARCHAR(20) not null;
> create table typeP
> (
> Plantype Plantype
> PRIMARY KEY check(typeAvion like '[A-Z]%'),
>
> or something like :
> IdAirport typeidairport PRIMARY KEY check (idairport like '[A-Z][A-
> [A-Z]')
>
> Is it possible to precise the constraint in the domain ?
>
> Thanks,
>
> Akim