I have two tables with exactly the same columns
Table A
id FLAG 1 Y 2 Y 3 N 4 N
Table B
id FLAG 1 Y 2 3 N 4
I would like to write a select query in Oracle that will display all rows in Table A where the FLAG column is not the same as Table B but having matching ID’s columns
The result should be as follows.
id FLAG 2 Y 4 N
“all rows in Table A … as Table B having matching ID’s columns”:
“where the FLAG column is not the same”:
So, the query would be
The
WHERE-condition is ugly but necessary to catch the cases where table b has aNULL-value, but a not, or the other way round…