CROSS JOIN with WHERE (Implicit Join)
CROSS JOIN with WHERE (Implicit Join) is a SQL clause in the JOIN Types category. Legacy implicit join syntax using comma-separated tables in FROM with WHERE filter. Pre-ANSI-92 style. The syntax is SELECT * FROM t1, t2 WHERE t1.col = t2.col;. It returns implicit join result. A typical example: SELECT e.name, d.dept_name FROM employees e, departments d WHERE e.dept_id = d.id; -- Old-style INNER JOIN (comma + WHERE) -- Still supported in all databases -- Equivalent ANSI JOIN: SELECT e.name, d.dept_name FROM employees e JOIN departments d ON e.dept_id = d.id; -- ANSI JOIN is preferred: -- - Clearer which is join condition vs filter -- - Easier to combine with LEFT JOIN -- - Avoids accidental cross join… A close relative is INNER JOIN, which returns only rows where there is a match in BOTH tables. The most common JOIN type. A close relative is LEFT JOIN, which returns ALL rows from the left table and matching rows from the right. Unmatched right rows show NULL.