Subject | Re: Query slow |
---|---|
Author | sivram_mail |
Post date | 2003-04-16T13:46:09Z |
My dba is telling that don't use subquery.Without using subquery, can
we change this query to get the desired result.
Sivaraman
we change this query to get the desired result.
Sivaraman
--- In ib-support@yahoogroups.com, Daniel Rail <daniel@a...> wrote:
> Hi,
>
> At April 16, 2003, 09:53, sivram_mail wrote:
>
> >this is the query which is written:
> >-----------------------------------
> >select * from table1 where id not in
> >(select id from table2,table1 where table1.no=table2.no )
>
> >In this query , there is no join condition for primary key.
>
> Try:
>
> select * from table1 where not exists
> (select * from table2 where table2.no=table1.no )
>
> --
> Best regards,
> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.filopto.com)