What is the difference between two TSQL Joins?

I am wondering what the difference is between the following queries (using two different join syntaxes). I saw this in some code that was inherited, and I was curious if the result is always the same. And if not, why will you use one over the other.

Request # 1 Example:

SELECT * FROM TableA a
  INNER JOIN TableB b
    INNER JOIN TableC c
      ON b.TableBId = c.TableCId
     ON b.TableBId = a.TableAId

Request # 2 Example:

SELECT * FROM TableA a
  INNER JOIN TableB b
     ON b.TableBId = a.TableAId
  INNER JOIN TableC c
     ON b.TableBId = c.TableCId
+3
source share
3 answers

As already mentioned, you can look at the execution plans to make sure that these are indeed the same requests. I'm pretty sure they are, though

, . , . №2, . , , , .

, , . , , /.

, - query2, :)... ,

+2

. , , .

0

.

0

All Articles