Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL: Inner join vs Where [duplicate]

Is there a difference in performance (in mysql) between

Select * from Table1 T1 
Inner Join Table2 T2 On T1.ID = T2.ID

And

Select * from Table1 T1, Table2 T2 
Where T1.ID = T2.ID

?

like image 726
Victor Avatar asked Mar 11 '11 14:03

Victor


1 Answers

As pulled from the accepted answer in question 44917:

Performance wise, they are exactly the same (at least in SQL Server) but be aware that they are deprecating the implicit outer join syntax.

In MySql the results are the same.

I would personally stick with joining tables explicitly... that is the "socialy acceptable" way of doing it.

like image 125
Patrick Avatar answered Nov 15 '22 16:11

Patrick