Subject Re: check and constraint///
Author Raúl Alberto Valencia Najarro
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:
> hello all,
>
>
> 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-
Z]
> [A-Z]')
>
> Is it possible to precise the constraint in the domain ?
>
> Thanks,
>
> Akim