Subject Removing a check constraint caused from a domain
Author Paul R. Gardner
I have a domain defined as:

CREATE DOMAIN BOOLEAN AS
SMALLINT
DEFAULT 0
CHECK (VALUE IN(0,1))

Next I added a field to a table of type domain:
ALTER MYTABLE ADD MYFIELD BOOLEAN;

Month's of data later I want to remove the constraint on the field:
ALTER TABLE MYTABLE ALTER MYFIELD TYPE SMALLINT;

It's now a smallint field. The CHECK is still present though I cannot
see it anywhere. I checked all RDB$ related tables and cannot find the
check. Inserting a value of 2 in this field causes a constraint error
though. How can I remove this constraint that was added because of the
original domain?


[Non-text portions of this message have been removed]