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 -> Newbie question: select row in a table that not exist in other table.

Newbie question: select row in a table that not exist in other table.

From: <jose_luis_fdez_diaz_news_at_yahoo.es>
Date: 21 Sep 2005 05:06:35 -0700
Message-ID: <1127304395.340688.202100@g14g2000cwa.googlegroups.com>

Hi,

1)

select GPRS_CO_MSISDN
from GPRS_SERVICIO_GPRS
where NOT EXISTS (select 1 from SAPN_SERVICIO_APN

                 where SAPN_CO_MSISDN =
GPRS_SERVICIO_GPRS.GPRS_CO_MSISDN
                 )

group by GPRS_CO_MSISDN;

2)

select g.GPRS_CO_MSISDN from GPRS_SERVICIO_GPRS g, SAPN_SERVICIO_APN a where NOT (g.GPRS_CO_MSISDN = a.SAPN_CO_MSISDN) group by g.GPRS_CO_MSISDN;

Two questions:

Is the result set the same in both queries ?

Why query 1) is faster than query 2 ?

Thanks in advance,
Jose Luis. Received on Wed Sep 21 2005 - 07:06:35 CDT

Original text of this message

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