Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: HELP w/ Delete Query ot Oracle 7.3
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?
Try the following:
DELETE tmp
WHERE field = (SELECT t.field FROM tmp t, tmp2 t2 WHERE t.field =
t2.field);
-- Ashok F. Kapur | Galaxy Latin America | Project Engineer | (954)958-3373 | afkapur_at_ccgate.hac.comReceived on Thu Jul 03 1997 - 00:00:00 CDT
![]() |
![]() |