Subject | Re: [firebird-support] Adding check values to a domain |
---|---|
Author | Martijn Tonies |
Post date | 2006-10-05T21:51:21Z |
Hi,
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
> Currently I have the following domain defined:According to Database Workbench, which just generates the
>
> 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?
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