I'm learning mysql. Under all cases, is Join the same as Cross Join? For example, this query

SELECT * FROM table t1
JOIN table t2

Will always be the same as

SELECT * FROM table t1
CROSS JOIN table t2

Even if I add WHERE, GROUP BY, HAVING, LIMIT, ORDER etc.... conditions afterwards, JOIN and CROSS JOIN will always yield the same results?



INNER, OUTER, and CROSS are ignored by MySQL. The ON and WHERE control which type of JOIN it is.

In your examples you have nothing tying the tables together, hence operates like a CROSS JOIN.

GROUP BY, etc have no impact.

  • 1
    That's not enirely correct (about the OUTER). The FROM a OUTER JOIN b will produce a syntax error. – ypercubeᵀᴹ May 13 '15 at 21:32
  • I stand corrected. – Rick James May 13 '15 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.