I have two tables. The data in those are something like below:
Table 1:
Col1 Col2
----------------
A A1
A A2
A A3
B B1
B B2
B B3
Table 2:
Col1 Col2
------------------
A A1
A A4
A A5
B B1
B B4
B B5
I need to bring out the difference in data in Col2 of two tables based on the values in Col1. The output should look something like below:
Output:
Col MismatchValuesInTable1 Mismatchvaluesintable2
---------------------------------------------------------
A A2 A4
A3 A5
B B2 B4
B3 B5
Please help me with a query to achieve the above.
SQLFiddle demo