oracle foreign-key question

Hill, Greg grhill at corp.untd.com
Tue Aug 22 15:44:59 MDT 2006


> You can have NULL in a column that is a foreign key UNLESS the column
> is also defined to be NOT NULL.

Ah... I had wrongly assumed that the user and visitor tables' primary
keys were declared not null, but after looking again, I noticed they
were not (ie they were nullable).

> You want essentially an XOR condition, which you can emulate by doing
> a CHECK (see below).

Hadn't ever heard of CHECK, that works great, thx.

Much better solution than what I had come up with on my own.  Thanks
Michael.

Greg



More information about the PLUG mailing list