-
Row comparision for 2 identical tables
Hi Guys,
Been asked to look at row comparision in 2 identical tables, and report on rows with differenct data.
For example, I have 2 tables of identical structure - table1 and table2.
Create table TABLE1 (or TABLE2)
( cust_num number(4),
favourite_colour varchar2(10),
favourite_car varchar2(10))
The primary key on both is cust_num.
I need to output the cust_num and the values on both tables, where the values do not match for the primary key. The code should only output the columns where a difference exists.
For example -
CUST_NUM TABLE1.FAVOURITE_COLOUR TABLE2.FAVOURITE_COLOUR
-------- ----------------------- -----------------------
123 RED BLUE
Can anyone give me starter (or complete solution, if you're feeling generous). I'm scheduled to look at this tomorrow, and would appreciate any early input.
(ps - this is not my homework!!)
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|