LEFT JOIN
Returns ALL rows from left table, matching from right.
sql
1SELECT s.name, c.course_name
2FROM students s
3LEFT JOIN courses c ON s.course_id = c.id;Students without courses show NULL for course_name.

Returns ALL rows from left table, matching from right.
1SELECT s.name, c.course_name
2FROM students s
3LEFT JOIN courses c ON s.course_id = c.id;Students without courses show NULL for course_name.