Subject Re: [firebird-support] Alter Domain
Author Daniel Rail
Hi,

At September 28, 2004, 06:48, Cao Ancoinc wrote:


> Is it possible to alter the check clauses in a domain

> I have the following domain

> CREATE DOMAIN dm_ModeType AS CHAR(1)
> CHECK (VALUE IN ('C','O', 'S', 'V'));

> and the domain must now be changed to

> CREATE DOMAIN dm_ModeType AS CHAR(1)
> CHECK (VALUE IN ('C','L','O', 'S', 'V')); ==> added 'L'

You'll have to drop the check constraint, then create the new check
constraint.

To drop the constraint from a domain:
ALTER DOMAIN dm_ModeType
DROP CONSTRAINT

To create the new constraint:
ALTER DOMAIN dm_ModeType
ADD CHECK (VALUE IN ('C','L','O', 'S', 'V'))



--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)