0

Please can anyone explain me what is the difference between the two statements,

SELECT [EmployeeStats].EmpName, [EmployeeStats].Desiganation,[TeamStats].TLGroupID,
    [TeamStats].[Shift]
FROM [EmployeeStats],[TeamStats]
WHERE [EmployeeStats].TeamID = TeamStats.TeamID

And

SELECT [EmployeeStats].EmpName, [EmployeeStats].Desiganation [TeamStats].TLGroupID,
    [TeamStats].[Shift]
FROM [EmployeeStats]
INNER JOIN [TeamStats]
ON [EmployeeStats].TeamID=TeamStats.TeamID
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
  • 1
    Functionally there is no cross join anywhere here. The query plans will be identical. The latter syntax is preferred because when you start doing outer joins instead of inner joins, the former syntax can be ambiguous whereas as the SQL 92 syntax is not – Nick.Mc Jun 26 '15 at 03:33
  • 1
    @Nick.McDermaid: Further, the older syntax (#1 here) can lead to OUTER JOINS unintentionally reducing to INNER JOINS if especial care is not taken. – Pieter Geerkens Jun 26 '15 at 04:05

0 Answers0