I learned something new today. In JOIN T-SQL syntax, the ON is not necessary immediately. I’m not sure what benefit this would give, but is a nice piece of trivia.
For example, the following query WORKS in the AdventureWorks2012 database:
SELECT * FROM HumanResources.EmployeePayHistory INNER JOIN HumanResources.Employee INNER JOIN HumanResources.EmployeeDepartmentHistory INNER JOIN HumanResources.Department ON Department.DepartmentID = EmployeeDepartmentHistory.DepartmentID ON EmployeeDepartmentHistory.BusinessEntityID = Employee.BusinessEntityID ON EmployeePayHistory.BusinessEntityID = Employee.BusinessEntityID
The order of the ONs matters. The last two tables joined need to have the first ON, continuing in reverse order.