Is there a limit to the number of columns I can JOIN two tables on in MySQL?
+2
A:
To the extent that there is a limit on the size of an SQL statement, then Yes: you cannot create an SQL statement that joins so many columns that the joining condition does not fit inside the limit on an SQL statement.
Otherwise - and in practice - No. You will run out of the ability to comprehend your joins before the DBMS runs out of the capacity to handle them.
Jonathan Leffler
2010-06-25 19:05:06