I apologize if this has been asked before- I searched google but could
not find a concrete answer.
I recently inherited a database whose t-sql code is written in a format
that I find difficult to read (versus the format I have used for
years).
I have tested the queries below using the SQL Profiler, and both have
identical costs. Is there any advantage of one format over the other?
Format 1:
---------
SELECT *
FROM Customers c, Orders o
WHERE c.CustomerID = o.CustomerID
Format 2:
---------
SELECT *
FROM Customers c
INNER JOIN Orders AS o ON c.CustomerID = o.CustomerID
Is it just a matter of personal preference? Does the same hold true for
using OUTER JOIN versus the old *= or =* ?
Thanks,
Matt
not find a concrete answer.
I recently inherited a database whose t-sql code is written in a format
that I find difficult to read (versus the format I have used for
years).
I have tested the queries below using the SQL Profiler, and both have
identical costs. Is there any advantage of one format over the other?
Format 1:
---------
SELECT *
FROM Customers c, Orders o
WHERE c.CustomerID = o.CustomerID
Format 2:
---------
SELECT *
FROM Customers c
INNER JOIN Orders AS o ON c.CustomerID = o.CustomerID
Is it just a matter of personal preference? Does the same hold true for
using OUTER JOIN versus the old *= or =* ?
Thanks,
Matt
Comment