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

Home -> Community -> Usenet -> c.d.o.tools -> Re: inverted foreign key constraint

Re: inverted foreign key constraint

From: Matthew Fuller <matthewlf_at_my-deja.com>
Date: Fri, 19 Jan 2001 13:25:12 GMT
Message-ID: <949f7j$ahb$1@nnrp1.deja.com>

In article <3A674A81.A982EF8A_at_P.NL>,
  Joporus <C_at_P.NL> wrote:
>
> Hi
>
> I am trying to define a constraint in order to exclude something , in
> this case an articlenumber, which is stored in one table, also to
 exist
> in an other table. Something like an inverted foreign key, I would
 say.
>
> I tried it with a 'check' constraint, but that didn't allow a subquery
> on the other table.
>
> Anybody got a tip?
>
> Arjen
>
>

Arjen,

The only way that I know of to do this is in a trigger that checks for the value in the other table. This may or may not be possible/reliable depending on how static your data is.

Matt.

Sent via Deja.com
http://www.deja.com/ Received on Fri Jan 19 2001 - 07:25:12 CST

Original text of this message

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