Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to Swap Two Tables?
> [...]
> 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