SQL Left Join

A LEFT JOIN (or LEFT OUTER JOIN) returns all rows from the left table and the matching rows from the right table. If there are no matches, NULL values are returned for the columns from the right table.

Example: Using LEFT JOIN

SELECT FreedomFighters.Name, Events.EventName, Events.EventDate
FROM FreedomFighters
LEFT JOIN Events ON FreedomFighters.FighterID = Events.FighterID;

Output:

NameEventNameEventDate
Mahatma GandhiDandi March1930-03-12
Subhas Chandra BoseINA Formation1942-10-21
Bhagat SinghLahore Protest1929-12-19
Rani Lakshmi BaiBattle of Jhansi1858-03-23