Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: inverted foreign key constraint
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