Code
-
APX1086 – Check syntax errors
APX1095 – GOTO Usage
APX1112 – Semi-colons statement terminator
APX1113 – Uninitialized variable
APX1114 – Unused parameter
APX1123 – SET NOCOUNT OFF Usage
APX1131 – Un-closed cursor
APX1132 – Cursor not deallocated
APX1133 – RAISERROR with severity above 18 missing WITH LOG clause
APX1136 – Direct use of Date-Time functions
APX1139 – WAITFOR delay statement
APX1154 – Unpaired sp_xml_preparedocument
APX1162 – Cyclomatic complexity
APX1191 – Reserved word used as identifier
APX1206 – Invalid cursor operation
APX1207 – Missing SET NOCOUNT ON before Unatteended DML execution
APX1209 – INSERT EXEC statement
APX1212 – Printing from a trigger
APX1220 – No TRY…CATCH
APX1233 – Undocumented stored procedure usage
APX1235 – Non-recommended settings
APX1241 – Cannot roll back THROW
APX1281 – Permission is granted in procedure body
APX1284 – Duplicate Cursor name
APX1285 – Cursor with no specified scope
APX1287 – Hardcoded database name
APX1288 – Statement outside of begin..end block
APX1308 – Trigger should be enabled
Deprecated features
-
APX1094 – Non-ANSI outer join
APX1119 – String = expression_alias
APX1125 – Constants in ORDER BY
APX1128 – Table hint without WITH keyword
APX1152 – Deprecated data types: TEXT, NTEXT and IMAGE
APX1182 – Returning results from triggers
APX1236 – Use of CREATE/DROP DEFAULT
APX1237 – ANSI_NULLS or QUOTED_IDENTIFIER OFF
APX1242 – Use of @, @@, or @@ as Transact-SQL identifiers
APX1270 – SET CONCAT_NULL_YIELDS_NULL OFF
APX1271 – SET ANSI_PADDING OFF
APX1272 – Space separator for table hints
APX1282 – SET REMOTE_PROC_TRANSACTIONS
APX1283 – Numbered procedures
APX1289 – Three-part and four-part column references
APX1291 – Timestamp syntax
APX1292 – Table option “text in row”
APX1293 – CREATE/DROP RULE
APX1294 – sp_bindrule and sp_unbindrule usage
APX1295 – fn_get_sql function usage
APX1296 – sp_estimated_rowsize_reduction_for_vardecimal usage
APX1297 – data types sp_addtype and sp_droptype usage
APX1298 – GROUP BY ALL clause usage
APX1299 – ROWGUIDCOL as a column name in DML statements
APX1300 – IDENTITYCOL as a column name in DML statements
APX1301 – DEFAULT keyword usage as default value
APX1302 – Deprecated stored procedure
Design
-
APX1129 – Index type not specified explicitly
APX1165 – Unspecific DECIMAL or NUMERIC data types
APX1171 – (N)VARCHAR data type size not specified
APX1195 – Identity Column usage
APX1213 – Nullability not specified
APX1222 – Small (N)VARCHAR columns
APX1223 – Small (N)VARCHAR variables
APX1229 – Missing primary key
APX1303 – Disabled foreign key
APX1304 – ON DELETE CASCADE action Usage
APX1305 – Identity column should not be used in the Primary Key
APX1307 – Use Integer data types for primary key when possible
APX1309 – Enable cascading updates
Maintenance
-
APX1109 – QUOTED_IDENTIFIERS or ANSI_NULLS in a programmability object
APX1118 – Unassigned variable
APX1143 – Potential “unfinished” development
APX1146 – Unused variable
APX1190 – Output parameter never assigned
APX1203 – Duplicate identifier
APX1224 – Comment header
Naming convention
-
APX1088 – Parameters names not specified explicitly
APX1110 – Special chars in name
APX1155 – Naming convention prefix
Performance
-
APX1092 – HAVING with non-aggregate functions
APX1096 – Comparison with NULL
APX1120 – Temporary table
APX1130 – Not equal operator in WHERE
APX1135 – DML and DDL mixed
APX1145 – “%” first in LIKE
APX1173 – NOT IN in a WHERE clause
APX1186 – Cursor
APX1225 – Missing clustered index
APX1234 – WITH RECOMPILE
APX1273 – Stored procedure calls from a trigger
APX1274 – Transactions in a stored procedure
APX1277 – Do not use SET FORCEPLAN OFF
APX1278 – Incorrect usage of COUNT()
APX1280 – Cursor not declared as readonly
Query
-
APX1090 – Avoid Select(*)
APX1091 – TOP without ORDER BY
APX1093 – Non-ANSI join
APX1137 – Missing table aliases
APX1141 – Subquery join with TOP clause
APX1144 – Missing WHERE/JOIN clause
APX1170 – Column numbers in ORDER BY clause
APX1176 – Missing join predicate
APX1180 – SELECT INTO
APX1184 – ISNUMERIC function
APX1185 – CHARINDEX in Where clause
APX1193 – IN predicate
APX1197 – OR operator in WHERE clause
APX1210 – Missing columns in insert
APX1230 – SET ROWCOUNT
APX1243 – MERGE
APX1276 – Statement without TRY…CATCH
APX1286 – Database context change
Security
Latest posts by SQLShack (see all)
- Best author award in 2021 - January 3, 2022
- Best author award in 2020 - January 5, 2021
- Best author award in 2019 - January 3, 2020