views:

21

answers:

1

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