Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: multiple foreign keys; can they operate in an OR relationship?

Re: multiple foreign keys; can they operate in an OR relationship?

From: Alan <alan_at_erols.com>
Date: Fri, 1 Oct 2004 10:37:33 -0400
Message-ID: <2s58deF1eihnjU1@uni-berlin.de>

"Jose" <josepinchero_at_yahoo.com> wrote in message news:b9dff992.0409301635.2391b98f_at_posting.google.com...
> Using the below script, i wanted to know if i could create multiple
> foreign keys on a single column in a child table that operate in an OR
> fashion.
>
> Table tempP1 hold one possible key, and tempP2 holds the other. I
> wanted a insert into tempC to check both FK tables: tempP1 OR tempP2
> has the key (which would succeed)...not tempP1 AND tempP2 have the key
> (which failed)
>
> Is this possible? am i missing something in the syntax?
>
> Thanks.
>

As Dan pointed out, you could do it with PL/SQL, but I wonder if your overall design is correct. When situations such as what you described happen, it is often a sign of improper design. Received on Fri Oct 01 2004 - 09:37:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US