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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to Swap Two Tables?

Re: How to Swap Two Tables?

From: Erik <no_at_spam.com>
Date: Sun, 2 Nov 2003 00:26:04 +0100
Message-ID: <bo1fh3$of$1@news.lth.se>


> [...]
> Now return to my questions. Let me ask them one by one --
>
> Fist One:
>
> With SQL, how can I compare two table content to see if they are
> identical or not? If not, can I show their difference using certain
> SQL commands and dump the output?

SELECT COUNT(*) num_differences FROM
((SELECT * FROM tbl1 MINUS SELECT * FROM tbl2) UNION ALL
(SELECT * FROM tbl2 MINUS SELECT * FROM tbl1))

/Erik Received on Sat Nov 01 2003 - 17:26:04 CST

Original text of this message

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