Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Sql not exists

Re: Sql not exists

From: Jan Pruner <jan_at_pruner.cz>
Date: Thu, 25 Oct 2001 02:46:32 -0700
Message-ID: <F001.003B3E6C.20011025025555@fatcity.com>

select ld from t1 <operator> select ld from t2;

Operator         Returns 
UNION           All rows selected by either query. 
UNION ALL    All rows selected by either query, including all duplicates. 
INTERSECT   All distinct rows selected by both queries.  MINUS        All distinct rows selected by the first query but not the second.

JP

On Thu 25. October 2001 10:35, you wrote:
> Hallo you DBA'
>
> Can anyone give me a good example on a sql select statement checking which
> ids exists in table one but not in table two? Table two also contains the
> corresponding id field but with other field names besides. Like this
>
> Table 1: Id Name Year
> Table 2: :Id City Country
>
> Thanks in advance
>
> Roland Sköldblom

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jan Pruner
  INET: jan_at_pruner.cz

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Oct 25 2001 - 04:46:32 CDT

Original text of this message

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