Using Old Join Syntax
The old join syntax still functions in SQL Server 2014, however it may be one of the most argued against formats.
For instance the following implies an inner join, even though it is not explicitly called out:
SELECT sc1.name, sc2.name FROM sys.columns sc1, sys.columns sc2 WHERE sc1.object_id = sc2.object_id;
Which can be replaced with the following which specifically calls out an inner join, not using the old format.
SELECT sc1.name, sc2.name FROM sys.columns sc1 INNER JOIN sys.columns sc2 ON sc1.object_id = sc2.object_id;
Do you agree?
If you don’t agree the old style join is considered as technical debt, that is just fine, in the Database Health Reports settings dialog you can turn the check for old style joins off. As long as you have coding standards that state one opinion or another on the old style joins being your standard, then you are doing better than most. I would strongly suggest not using the old format.
A good coding standard can over-ride many of the items that may be considered as technical debt.
Leave a Reply