Suppose I have two SELECT
query on same table and I need to compare them column by column.
Query 1:
select * from mytable t1 where t1.code = '100'
returns:
id name
1 A
2 B
Query 2:
select * from mytable t2 where t2.code = '999'
returns:
id name
1 A
2 C
For my case both query returns same number of rows.
Desired result
id name_t1 name_t2
2 B C
How can I found the data difference between them using PL/SQL developer (better using tools to avoid query)?
My PL/SQL Developer Version 8.0.3.1510
you can use MINUS
select * from mytable t1 where t1.code = '100'
MINUS
select * from mytable t2 where t2.code = '999';
MINUS gives you the rows that are found in the first query and not in the second query by removing from the results all the rows that are found only in the second query