Exercise: All Students
Get all students, even without courses.
Solution
sql
1SELECT s.name, c.course_name
2FROM students s
3LEFT JOIN courses c ON s.course_id = c.id;
Get all students, even without courses.
1SELECT s.name, c.course_name
2FROM students s
3LEFT JOIN courses c ON s.course_id = c.id;