Subject Re: [firebird-support] Adding check values to a domain
Author Martijn Tonies
Hi,

> Currently I have the following domain defined:
>
> CREATE DOMAIN IMPOEXPO AS
> CHAR(1)
> NOT NULL
> CHECK (VALUE IN ('I','E'))
>
> I want to add more check constraints to it, i.e. it should end up
> being like this:
>
> CREATE DOMAIN IMPOEXPO AS
> CHAR(1)
> NOT NULL
> CHECK (VALUE IN ('I','E','1','2'))
>
> How can I do this in FB 1.5.3?

According to Database Workbench, which just generates the
correct DDL for you, this would be:

ALTER DOMAIN IMPOEXPO DROP CONSTRAINT;
ALTER DOMAIN IMPOEXPO ADD CONSTRAINT CHECK (VALUE IN ('I','E','1','2'))



Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com