Created
February 6, 2013 16:27
-
-
Save mauroartizzu/4723761 to your computer and use it in GitHub Desktop.
MySQL Full Outer Join
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM TABELLA1 | |
LEFT JOIN TABELLA2 | |
ON TABELLA1.CAMPO1 = TABELLA2.CAMPO2 | |
UNION | |
SELECT * | |
FROM TABELLA1 | |
RIGHT JOIN TABELLA2 | |
ON TABELLA1.CAMPO1 = TABELLA2.CAMPO2 | |
WHERE TABELLA1.CAMPO1 IS NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment