when using ANSI SQL-92 syntax, the ON keyword is part of the join, except for cross join , since you have no condition for the relationship.
ex.
INNER JOIN
SELECT * FROM tableA INNER JOIN tableB on tableA.ID = tableB.ID
CROSS JOIN
SELECT * FROM tableA CROSS JOIN tableB
ON should follow the joined table (joined as INNER and OUTER ), so you won't have a syntax error. but if you use the ANSI SQL-89 syntax, the ON keyword is omitted, but you must specify the relation on where clause
ex.
INNER JOIN
SELECT * FROM tableA, tableB WHERE tableA.ID = tableB.ID
CROSS JOIN
SELECT * FROM tableA, tableB
it is error prone because if you forget this condition it will not generate a syntax error and most likely will make a cross join
source share