CROSS JOIN
CROSS JOIN is every row of A paired with every row of B. 3 students × 4 subjects = 12 rows. No ON. Sometimes useful to generate combinations (students × exam dates).
A missing ON on an INNER JOIN accidentally becomes this. If the result is huge, you probably crossed.
Trap — CROSS JOIN as a ‘fancy join’ in every answer. It is rare on purpose.
On the example next to this theory — CROSS JOIN — jOIN combines rows using a match condition between tables.
students.id
=
marks.student_id
│
▼
one result rowExam tip
3 × 4 = 12 rows. Accidental if you forgot ON.