Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Comparing backup database with current database
On Mon, 16 Apr 2001 13:40:01 -0400, "Nick Bowler" <Nick_Bowler_at_amsinc.com> wrote:
>I have two tables - A and B. B is a copy of A made yesterday. The tables
>are such that rows are changed and added, never deleted. I need to
>determine the differences between these two tables. Determining rows added
>is easy. However, to determine rows that are different I have had to resort
>to building a query along the lines of
>
>SELECT key
>FROM A, B
>WHERE A.key = B.key AND(
> A.field1 <> B.field1
> OR A.field2 <> B.field2
> OR A.field3 <> B.field3 ....);
>
>Can anyone suggest a better way of determining if rows are different. Note:
>I am using Oracle 8.1.6.
>
select <anything>
from A
minus
select <anything>
from B
anything must have the same datatype and rows will show when there's any difference.
Hth,
Sybrand Bakker, Oracle DBA Received on Mon Apr 16 2001 - 13:29:48 CDT
![]() |
![]() |