Skip
Arish's avatar

175. RIGHT OUTER JOIN


RIGHT JOIN

Returns ALL rows from right table.

sql
1SELECT s.name, c.course_name
2FROM students s
3RIGHT JOIN courses c ON s.course_id = c.id;

Shows all courses, even without students.

Note: SQLite doesn't support RIGHT JOIN directly.