Code Smells
Introduction
Section titled “Introduction”This analysis group contains maintainability-related rules.
Code Smells
Section titled “Code Smells”Related Topics
Section titled “Related Topics”EX0005 : Check script for data modifying statements - INSERT,UPDATE,DELETE or EXECUTE
EX0006 : Identify possible missing Foreign Keys
EX0009 : Consider adding proper comment block before each database object create statement
EX0015 : Find best clustered index
SA0004 : Variable assigned but value never used
SA0005 : Non-ANSI outer join syntax
SA0006 : Non-ANSI inner join syntax
SA0008 : Deprecated syntax string_alias = expression
SA0009 : Consider using a table variable instead temporary table
SA0002 : Variable declared but never referenced or assigned
SA0022 : Index type (CLUSTERED or NONCLUSTERED) not specified
SA0023 : Avoid using not equal operator (<>,!=) in the WHERE clause
SA0020 : Always use a column list in INSERT statements
SA0029 : Input parameter never used
SA0033 : Do not use the GROUP BY clause without an aggregate function
SA0038 : The comparison expression evaluates to TRUE
SA0039 : The comparison expression evaluates to FALSE
SA0042A : Avoid using special characters in object names
SA0042B : Avoid using special characters in object names
SA0043A : Avoid using reserved words for type names
SA0043B : Avoid using reserved words for type names
SA0061A : Check all Tables in the current database for following specified naming convention
SA0062A : Check all Functions in the current database for following specified naming convention
SA0063A : Check all Views in the current database for following specified naming convention
SA0063B : Check view names used in CREATE VIEW statements for following specified naming convention
SA0065A : Check all Triggers for following specified naming convention
SA0066A : Check all Columns for following specified naming convention
SA0066B : Check all Columns for following specified naming convention
SA0067B : Check all Unique Key Constraints for following specified naming convention
SA0071B : Check all Foreign Key Constraints for following specified naming convention
SA0072B : Check all Non-Key Index for following specified naming convention
SA0073B : Check all User-Defined Types for following specified naming convention
SA0074A : Check all Schema-s in the current database for following specified naming convention
SA0074B : Check all Schema-s for following specified naming convention
SA0078 : Statement is not terminated with semicolon
SA0079 : Avoid using column numbers in ORDER BY clause
SA0241 : Check transaction and savepoint names for following specified naming convention
SA0244 : Database object created,altered or dropped without specifiying schema name
SA0248 : Stored procedure called with mixing both unnamed and named arguments style
SA0249 : Specify default value for columns added with NOT NULL constraint
SA0250 : Consider calling procedures with named arguments
SA0255 : Consider using extended cursor declaration syntax instead of the ISO syntax
SA0261 : The number of characters per line should not exceed the configured value
SA0264 : Temporary table created but not used as table source
SA0269 : Datatype identifier is not in the required case
SA0082 : Consider prefixing column names with table name or table alias
SA0084 : Data purity check is not enabled for the current database
SA0085 : Check database objects for missing specific extended properties
SA0096 : The collation of the current database does not match that of the model database
SA0119 : Consider aliasing all table sources in the query
SA0125 : Avoid use of the SELECT INTO syntax
SA0136 : Use fully qualified object names in SELECT, UPDATE, DELETE, MERGE and EXECUTE statements
SA0144 : The code following the RETURN or the RAISERROR statements will never be executed
SA0145 : The EOL marker sequence is not the expected {CR}{LF}
SA0149 : Consider using RECOMPILE query hint instead of WITH RECOMPILE option
SA0155 : Deprecated setting of database option CONCAT_NULL_YIELDS_NULL to OFF
SA0155B : Setting CONCAT_NULL_YIELDS_NULL to OFF is deprecated
SA0156 : Statements CREATE/DROP DEFAULT are deprecated. Use DEFAULT keyword in CREATE/ALTER TABLE
SA0153 : Always specify parameter names when calling stored procedures
SA0159 : Deprecated use of object name containing only # characters
SA0165 : TOP (100) PERCENT found
SA0170 : It is recommend to not use CTE unless it is need for hierarchical data
SA0171 : The ROW_NUMBER paging pattern can be replaced with OFFSET FETCH clause
SA0167 : Non-ISO standard comparison operator found
SA0176 : Consider merging nested IF statements to improve readability
SA0177 : To improve code readability, put only one statement per line
SA0179 : Do not create function and procedures with too many parameters
SA0180 : CASE expression has too many WHEN clauses
SA0181 : The query joins too many table sources
SA0182 : The CASE expressions is missing ELSE clause
SA0183 : The commented out code reduces readability and should be deleted
SA0184 : Redundant pairs of parentheses can be removed
SA0185 : Review the call for unintentionally passing the same value more than once as an argument
SA0191 : Procedure body is not enclosed in BEGIN…END block
SA0187 : Duplicated string literals complicate the refactoring
SA0188 : The NULL or NOT NULL constraint not explicitly specified in the table column definition
SA0193 : Avoid unused labels to improve readability
SA0230 : Identifier uses different case than object’s actual name
SA0231 : The used parameter or variable has different case than its declaration
SA0232 : The GO batch terminator command found inside comment
SA0233 : Temporary table created but not dropped
SA0234 : It is recommended to use the new TOP(expression) clause syntax