Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Get to know the data
JOIN revisited
LEFT JOIN
RIGHT JOIN
14. RIGHT JOIN again
FULL JOIN
OUTER JOINS
NATURAL JOIN
Aliases for tables

Instruction

Very well done! Let's do one more exercise.

Exercise

For each student show the room data the student is assigned to. Show also students who are not assigned to any room. Use a RIGHT JOIN.

Stuck? Here's a hint!

Type:

SELECT *
FROM room
RIGHT JOIN student
  ON student.room_id = room.id;