Re: Integrity constraint

From: Michael Rauscher <michlmann_at_gmx.de>
Date: Tue, 03 Feb 2009 10:17:43 +0100
Message-ID: <gm923q$64l$01$1_at_news.t-online.com>



vm22 wrote:
> Hi,
>
> I have a developer who has written the following code to delete some
> records:
>
> DELETE FROM x
> WHERE id NOT IN (SELECT id
> FROM y)
> AND id NOT IN (SELECT id
> FROM z);
>
> ORA-02292: integrity constraint (Y_FK) violated - child record found
>
> When there is already a clause in my delete to state do not delete
> records that are found in table Y, why do I get the integrity
> constraint error message?

Because a corresponding record exists in table Z?

Hint: De Morgan's laws

Bye
Michael Received on Tue Feb 03 2009 - 03:17:43 CST

Original text of this message