The SQL query
SELECT columns
FROM TableA
RIGHT OUTER JOIN TableB
ON A.columnName = B.columnName
WHERE A.columnName IS NULLreturns the following:
- AAll rows in Table B, which meets equality condition above and, none from Table A which meets the condition.
- BAll rows in Table A, which meets equality condition above and none from Table B, which meets the condition.
- CAll rows in Table B, which meets the equality condition
- DAll rows in Table A, which meets the equality condition