SQL Joins CheatSheet
This is one of the quickest SQL desk side notes for web developers and php programmers. Simple examples for all types of SQL Joins, such as Left Join, Inner Join, Full Outer Join, and Right Join variations.
Transcribed SQL Joins
SELECT <select_list> FROM TableA A LEFT JOIN TableB B ON A.Key = B.Key
SELECT <select_list> FROM TableA A LEFT JOIN TableB B ON A.Key = B.Key WHERE B.Key IS NULL
SELECT <select_list> FROM TableA A FULL OUTER JOIN TableB B ON A.Key = B.Key
SELECT <select_list> FROM TableA A INNER JOIN TableB B ON A.Key = B.Key
SELECT <select_list> FROM TableA A FULL OUTER JOIN TableB B ON A.Key = B.Key WHERE A.Key IS NULL OR B.Key IS NULL
SELECT <select_list> FROM TableA A RIGHT JOIN TableB B ON A.Key = B.Key WHERE A.Key IS NULL
SELECT <select_list> FROM TableA A RIGHT JOIN TableB B ON A.Key = B.Key
Write to us
or call the number 020 8446 1515