Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Comparison of two tables
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
![]() |
![]() |