Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL challenge;-)
Try the minus operator
Tracy Carlson
Oracle Support
"Frank an der Heiden" <fh_at_energotec.de> wrote in message
news:9cq15i$e56$1_at_oxygen.technet.net...
> hi,
>
> here a little task for all sql-freaks ;-))
>
> i have to tables.
> these tables have the same structure.
> i want to check out which row of <column> of the first table is not
> existing in <column> of the second table.
>
> this sql-statement works:
>
> SELECT <column> FROM <table1> WHERE <column> NOT IN (SELECT <column> FROM
> <table2>);
>
> but it is very very slow, because the second select is done very often if
> you have many rows in table1.
> any simple idea for improving performance?
> a tried to use a join, but i wasn't able to bring it to work, maybe it's
too
> late ;-((
>
> good night
> frank
>
>
>
Received on Thu May 03 2001 - 18:39:38 CDT