October 17th, 2013, 12:16 AM
Is this valid INNER JOIN?
Is it legal to use OR in INNER JOIN's "ON"?
October 17th, 2013, 02:58 AM
Does it work and does it return the results you want?
October 17th, 2013, 03:14 AM
Yes but it means nothing! ome features like group_concat or some cases of GROUP BY still work but only because it is mysql. I wanna make sure its valid everywhere.
Originally Posted by requinix
October 17th, 2013, 03:17 AM
Any conditional tests you can put in a WHERE clause can also be put into the ON clause of a join.
Originally Posted by English Breakfast Tea
Recycle your old CD's, don't just trash them
If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
October 17th, 2013, 05:21 AM
You can write it that way, but the real question is what you have in the design of your database that causes you to do it.
Because that query could potentially become very slow since OR's are not good for optimum index usage and placing an OR in a JOIN can cause a lot of index scans depending on the join direction.