joshua.vw
joshua.vw

Reputation: 67

Is CROSS JOIN the same as INNER JOIN / JOIN with out the ON condition?

Why would you use the CROSS JOIN keyword if you can just do INNER JOIN and have no condition? Am I missing something? Also can cross joins have on conditions?

Upvotes: 0

Views: 1120

Answers (1)

Akina
Akina

Reputation: 42844

In MySQL, JOIN, CROSS JOIN, and INNER JOIN are syntactic equivalents (they can replace each other).

In standard SQL, they are not equivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used otherwise.

MySQL Reference Manual / ... / JOIN Clause

Upvotes: 1

Related Questions