Subject Re: [ib-support] check syntax
Author Duilio Foschi
>
ALTER TABLE CHILD
ADD CONSTRAINT FOREIGN KEY (ParentID)
REFERENCES PARENT (ParentID)

ach!

I knew this, only I didn't know that the constraint is not invoked if
ParentID is NULL.

>Download the Language Reference and take a look at it.

I have the Language Reference, but it takes time to swallow it all :)

>We now have a CHILD table with either:
>
>1) no parents (NULL in the column ParentID)
>2) a parent as available in table PARENT

more then having 2 tables in a master/child relation, I have a table and a
2nd lookup table, but I guess that one can see it both ways.

One more question:

what happens if the user - after having choosen a value for ParentID -
wants to change the field into a blank (undefined) value ?

Will the constraint still allow that ?

Thank you

Duilio