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 -> Re: Comparison of two tables

Re: Comparison of two tables

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 17 Nov 2005 17:03:14 -0800
Message-ID: <1132275794.477158.19250@o13g2000cwo.googlegroups.com>


A query using the set operators might be in order.

>From the SQL manual (10gR1)

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

As an example:
select * from table_a
minus
select * from table_b

See the SQL manual for full details.

HTH -- Mark D Powell -- Received on Thu Nov 17 2005 - 19:03:14 CST

Original text of this message

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