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

Home -> Community -> Usenet -> c.d.o.server -> Re: HELP w/ Delete Query ot Oracle 7.3

Re: HELP w/ Delete Query ot Oracle 7.3

From: Oleg Dimerman <olegd_at_oeonline.com>
Date: 1997/07/02
Message-ID: <33BAB26E.11F3@oeonline.com>#1/1

Bruce Hutfless wrote:
>
> Can anyone tell me what I'm doing wrong?
>
> delete from TMP
> where (select FIELD from TMP where FIELD in (select FIELD in TMP)
> intersect (select FIELD in TMP2));
>
> Technical discussion, assume to tables with identical fields, and I wish to
> delete all records in Table1 where a field in Table1 is equal to a field in
> Table2.
>
> My question is this query properly structured to do this, or how should I
> change it?

Use a subquery and EXISTS

-- 
____________________________________
Oleg Dimerman (olegd_at_oeonline.com)
Received on Wed Jul 02 1997 - 00:00:00 CDT

Original text of this message

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