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: Newbie: delete from multiple tables?

Re: Newbie: delete from multiple tables?

From: Thomas Kellerer <spam_eater_at_gmx.net>
Date: Thu, 17 Jul 2003 17:23:42 +0200
Message-ID: <bf6f1v$beoqf$1@ID-13919.news.uni-berlin.de>


Niall Litchfield wrote:
>
> SQL> delete t1
> 2 where exists (
> 3 select null from t2
> 4 where t1.id=t2.id
> 5 and t1.col2=t2.col2);
>

I was just about to post an answer with that version of the delete statement as well :-)

I would think that this is more efficient then having two subselects.

Thomas Received on Thu Jul 17 2003 - 10:23:42 CDT

Original text of this message

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