score:6

Accepted answer

What is difference between that?

AFAIK, both are doing INNER JOIN, First one using a Implicit JOIN syntax whereas the second one using a explicit join syntax

I wouldn't expect any performance difference between them but the second style of query using explicit join syntax is much more recommended over the first one cause it's ease of readability and clears the idea as what you are trying to perform. Also, the first style of writing is a old style join syntax.

score:3

Performance-wise or result-wise there shouldn't be a difference. With SQL server, the query optimizer actually converts your query to the best found execution plan. Both of you queries would end up as the same execution plan.

If using SQL server, run them both with the "display execution plan" option turned on.

That will tell you both how they're executed (if there's any difference at all) and the relative performance difference.

As others have said, one is preferred, but on syntax not performance grounds.


More questions

More questions with similar tag