Skip
Arish's avatar

166. INNER JOIN


INNER JOIN

Returns only matching rows from both tables.

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

Only returns students with valid course_id.