Published 16 November 2017
Rules that don't fall under one of the other categories.
Unable to parse SQL code. The SQL may be incorrect or contain syntax that SQL Code Guard doesn't understand.
Try fixing the SQL or rewriting it in a simpler form.
Although it makes very little difference to performance, every table variable results in a table being created and deleted in the TEMPDB database.
Also, clean code -- without unnecessary and unused parameters, variables and values -- greatly simplifies the complex task of managing large SQL projects and databases.
Temp tables have a small cost to performance, because they are created and deleted in the TEMPDB database.
This issue is not registered for query with single table in the FROM clause.
A Column name should be qualified with its table name if it is part of a join or is in a subquery, even if it is currently unambiguous. At some point a change could be made that will cause an error.
Unused variables are often a symptom of technical debt or unfinished work.
Unused parameters are often a symptom of technical debt or unfinished work.
They are sometimes necessary for backward-compatibility so only remove if safe to do so.
Including WAITFOR will slow the completion of the SQL Server process and can result in a timeout message in the application. If necessary, adjust the timeout setting for the connection at the application level.
Setting the QUOTED_IDENTIFIERS options inside a stored procedure, trigger or function will have no effect.