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 -> Are These 2 Statements Equal?

Are These 2 Statements Equal?

From: Buck Turgidson <jc_va_at_hotmail.com>
Date: Tue, 01 Apr 2003 19:04:12 GMT
Message-ID: <0e2e67ae5c9fc52627d533ddf0dfe013@news.teranews.com>


I believe they are, but I would like another pair of eyes so I don't blow it and get fired since I am changing vendor code. The performance of my version (the 2nd) is far better than the first.

DELETE FROM t
WHERE TYPE IN (SELECT TYPE FROM x

               WHERE process_date = :1
               AND process_status = 'A')
OR TYPE IN (SELECT TYPE FROM X2
            WHERE process_date <=:2
            AND process_status IN ('A','B'));


DELETE FROM t
WHERE TYPE IN (SELECT TYPE FROM x

               WHERE process_date = :1
               AND process_status = 'A'
               UNION
               SELECT TYPE FROM X2
               WHERE process_date <=:2
               AND process_status IN ('A','B'));
Received on Tue Apr 01 2003 - 13:04:12 CST

Original text of this message

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