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.

Returns only matching rows from both tables.
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.