Right Join
Right Join is simple if you keep it on paper. Amit uses it for student + marks in a report.
For Right Join, InnoDB is in play. Don’t blame it until you have traced student + marks.
Right Join exists so Amit can keep student + marks correct in a report.
Right Join shows up in a report. Name student + marks, not “a real-world scenario”.
Don’t do this with Right Join — missing ON → cartesian product. Interviewers spot it in ten seconds.
After Right Join, Amit should still remember missing ON → cartesian product.
One breath for Right Join, then student + marks, then missing ON → cartesian product. Sit down.
students.id
=
marks.student_id
│
▼
one result rowSay Right Join in one breath, then JOIN … ON s.roll = m.roll, then missing ON → cartesian product.