JOIN
JOIN sticks two tables side by side using a match. students has names. marks has scores. SELECT s.name, m.subject, m.score FROM students s JOIN marks m ON s.roll = m.roll;
ON is the match rule, usually PK = FK. If you forget ON (or use comma joins), you get every student with every marks row — cartesian product. That looks ‘too many rows’.
INNER JOIN (plain JOIN) keeps only matches. LEFT JOIN keeps all students even if they have no marks yet (marks columns NULL).
Draw two tiny tables on paper, three rows each, then the join result. That is the interview. Don’t recite six join names without a picture.
On the example next to this theory — JOIN combines rows using a match condition between tables.
students marks
roll name roll subject score
12 Asha JOIN 12 Maths 72
13 Kabir 12 Eng 40
│
▼ ON roll
Asha | Maths | 72
Asha | Eng | 40JOIN … ON s.roll = m.roll. Draw two small tables.