|
Capitals |
Country |
Capital |
India |
New Delhi |
USA |
Washington |
France |
Paris |
|
|
Continents |
Country |
Continent |
India |
Asia |
USA |
N.America |
Italy |
Europe |
|
|
---- Returns all the rows from the first Table, even if there are no matches in the second Table.
SELECT Capitals.*, Continents.Continent
FROM Capitals
LEFT JOIN Continents
ON Capitals.Country=Continents.Country
|
Output |
Country |
Capital |
Continent |
India |
New Delhi |
Asia |
USA |
Washington |
N.America |
France |
Paris |
NULL |
|