Subject RE: [firebird-support] Copy definition from domain to field
Author Alan McDonald
> Hi
>
> I have created a domain :
>
> YN = CHAR(1) DEFAULT 'Y' CHECK (value in ('N','Y'))
>
> I have created a tabele X with field AAA:
>
> CREATE TABLE X (
>
> AAA YN DEFAULT 'Y' NOT NULL /* YN = CHAR(1) DEFAULT 'Y' CHECK
> (value in
> ('N','Y')) */
>
> )
>
> I ask my self why, when I create a field from domain does not copy default
> value and CHECK Constrains on new field?
>
> TIA
> Paul

it doesn't have to - the domain default will apply unless your do as you
have done here by defingin a field default which takes precedent over the
domain default.
Just create a field with your domain and check that the default and checks
are done. no need to see them again in the table meta data
Alan