Here is the list of all issues (with short descriptions) that SQL Code Guard can find.

Best practice issues

BP001
Index type is not specified

Index type (CLUSTERED or NONCLUSTERED) is not specified in CREATE INDEX statement.

BP002
ORDER BY clause with constants

It is not recommended to use constants in ORDER BY clause.

BP003
SELECT in trigger

Trigger should not return data to a client.

BP004
INSERT without column list

It is recommended to specify column list explicitly. Table variables are not checked

BP005
Asterisk in select list

It is not recommended to use asterisk in select list.

BP006
TOP without ORDER BY

Usually TOP without ORDER BY is meaningless.

BP007
Declaring var type variables without length

Explicitly specify length.

BP008
CAST/CONVERT to var types without length

Explicitly specify the length.

BP009
Avoid var types of length 1 or 2

BP010
Usage of @@identity

It is not recommended to use @@identity because of side effects. Use SCOPE_IDENTITY instead.

BP011
NULL comparison or addition/substring

Operations with NULL can produce undesired results. Use IS [NOT] NULL and ISNULL/COALESCE function.

BP012
CASE without ELSE

It is recommended to explicitly specify a default action.

BP013
EXECUTE(string) is used

It is not recommended to use EXEC to run dynamic SQL. Use sp_executesql instead.

BP014
[NOT] NULL option is not specified in CREATE/DECLARE TABLE statement (registered once per table)

It is recommended to explicitly specify [NOT] NULL option in a table column definition.

BP015
Scope of cursor (LOCAL/GLOBAL) is not specified

It is recommended to specify the cursor scope explicitly.

BP016
Return without result code

BP017
DELETE statement without WHERE clause

BP018
UPDATE statement without WHERE clause

Deprecated

DEP001
Table hint without WITH keyword.

Table hint without WITH keyword. Use WITH keyword.

DEP002
WRITETEXT,UPDATETEXT and READTEXT statements are deprecated.

WRITETEXT,UPDATETEXT and READTEXT statements are deprecated.

DEP003
GROUP BY ALL clause is depracated.

GROUP BY ALL clause is depracated. Use custom case-by-case solution with UNION or derived table.

DEP004
COMPUTE and COMPUTE BY clauses are deprecated.

COMPUTE and COMPUTE BY clauses are deprecated. Use ROLLUP instead

DEP005
FASTFIRSTROW table hint is deperecated.

FASTFIRSTROW table hint is deperecated. Use [FAST n] instead.

DEP006
SETUSER statement is deprecated.

SETUSER statement is deprecated. Use EXECUTE AS instead.

DEP007
TAPE as backup device is deprecated.

TAPE as backup device is deprecated.

DEP008
PASSWORD/MEDIAPASSWORD options in BACKUP/RESTORE statement are deprecated.

PASSWORD/MEDIAPASSWORD options in BACKUP/RESTORE statement are deprecated.

DEP009
DBCC DBREINDEX statement is deprecated.

DBCC DBREINDEX statement is deprecated. Use ALTER INDEX REBUILD instead.

DEP010
DBCC CONCURRENCYVIOLATION is deprecated.

DBCC CONCURRENCYVIOLATION is deprecated.

DEP011
DBCC INDEXDEFRAG is deprecated.

DBCC INDEXDEFRAG is deprecated. Use ALTER INDEX DEFRAG instead.

DEP012
DBCC SHOWCONTIG is deprecated.

DBCC SHOWCONTIG is deprecated. Use sys.dm_db_index_physical_stats instead.

DEP013
Deprecated SET options

SET ANSI_NULLS,ANSI_PADDING,CONCAT_NULL_YIELDS_NULL,REMOTE_PROC_TRANSACTIONS,OFFSETS options are deprecated.

DEP014
SET ROWCOUNT option is deprecated.

SET ROWCOUNT option is deprecated. Use TOP(n) instead.

DEP015
READONLY and READWRITE options are deprecated.

READONLY and READWRITE options are deprecated. Use READ_ONLY and READ_WRITE options.

DEP016
TORN_PAGE_DETECTION option is deprecated.

TORN_PAGE_DETECTION option is deprecated.

DEP017
NON-ANSI join (*= or =*) is used

Non-ANSI joins (via *= or =*) are deprecated, use LEFT/RIGHT OUTER join syntax instead.

DEP018
ALL option in GRANT/DENY/REVOKE statement is deprecated

ALL option in GRANT/DENY/REVOKE statement is deprecated

DEP019
System table or view is deprecated.

System table or view is deprecated.

DEP020
Numbered procedures are deprecated.

Numbered procedures are deprecated. Do not use numbered procedures

DEP021
String literals as column aliases are deprecated

DEP022
DROP INDEX with two-part name is deprecated

DEP023
Not ending Transact-SQL statements with a semicolon is deprecated

DEP024
Use of a space as a separator between table hints is deprecated

DEP025
System stored procedure is deprecated

DEP026
Three-part and four-part column references in SELECT list are deprecated.

Three-part and four-part column references in SELECT list are deprecated. Two-part names is the standard-compliant behavior.

DEP027
System function is deprecated

DEP028
This RAISERROR syntax is deprecated

Execution issues

EI001
Incompatible variable type for procedure call

Variable type is not fully compatible with procedure parameter type.

EI002
Incompatible literal type for procedure call

Literal type is not fully compatible with procedure parameter type.

EI003
Non-scalar subquery in place of a scalar

Subquery may return more than one row.

EI004
Extra parameter passed

A named parameter is not found in parameter list of a procedure.

EI005
Unnamed call after named call

It is not recommended to use the position notation after the named notation.

EI006
Required parameter is not passed

Parameter is not passed to a procedure and no default is provided.

EI007
Call parameter declared as output

Procedure parameter is not defined as OUTPUT, but marked as OUTPUT in procedure call statement.

EI008
Call parameter is not declared as output

Procedure parameter is defined as OUTPUT, but not marked as OUTPUT in procedure call statement.

EI009
Call has more parameters than required

Number of passed parameters exceeds the number of procedure parameters.

EI010
OPEN of undefined cursor

The cursor definition is not found in the current scope. OPEN statement will cause an error.

EI011
FETCH from undefined cursor

The cursor definition is not found in the current scope. FETCH statement will cause an error.

EI012
CLOSE of undefined cursor

The cursor definition is not found in the current scope. CLOSE statement will cause an error.

EI013
DEALLOCATE of undefined cursor

The cursor definition is not found in the current scope. DEALLOCATE statement will cause an error.

EI014
Fetch from cursor with asterisk in select list, unable to check columns

It is not recommended to use the asterisk in select list when defining a cursor.

EI015
Incorrect number of fetch variables

Number of variables in FETCH statement differs from the number of columns in cursor definition.

EI016
Reference to procedure in other database

Take notice of using hardcoded references to other databases.

EI017
Hardcoded current database name in procedure call

Take notice of using hardcoded names.

EI018
Missing parameter(s) name in procedure call

It is recommended to specify parameter name while calling a stored procedure.

EI019
BEGIN TRANSACTION without ROLLBACK TRANSACTION

Take notice of using BEGIN TRANSACTION without ROLLBACK TRANSACTION.

EI020
ROLLBACK TRANSACTION without BEGIN TRANSACTION

Take notice of using ROLLBACK TRANSACTION without BEGIN TRANSACTION.

EI021
Closing of unopened cursor

It is not possible to close an unopened cursor.

EI022
Fetch from unopened cursor

It is not possible to fetch rows from an unopened cursor.

EI023
Update/delete operation on cursor, but cursor is not declared as updatable

It is recommended to specify a cursor as updatable before performing UPDATE/DELETE operation on the cursor.

EI024
Stored procedure name starts with sp_

It is not recommended to start a user stored procedure name with sp_ as this prefix is used in built in stored procedures.

EI025
Executing stored procedure without getting result

EI026
Reference to function in other database

EI027
Reference to table or view in other database

EI028
Adding NOT NULL column without default value

Adding NOT NULL column without default value to a table with data will fail

EI029
Avoid using ISNUMERIC() function

Avoid using ISNUMERIC() function because it accepts int, numeric, float and money numbers

Misc

CGTIME
Timed out

Timeout during parsing

CGUNP
Unparsed SQL

Unable to parse SQL code

MI001
Table var is declared but never used

MI002
Temp table is declared but never used

MI003
Unqualified column name

This issue is not registered for query with single table in FROM clause.

MI004
Usage of sp_executesql (only in procedure/trigger)

MI005
Variable is declared but never used

MI006
Parameter is declared but never used

Performance issues

PE001
Schema name for procedure is not specified

It is recommended to always specify schema name

PE002
Schema name for table or view is not specified

It is recommended to always specify schema name

PE003
Creation of table by SELECT ... INTO ... statement

It is not recommended to use this method of creating a table. Create the table manually by means of CREATE TABLE statement.

PE004
INDEX HINT is used

It is not recommended to use index hints

PE005
JOIN HINT is used

It is not recommended to use join hints

PE006
TABLE HINT is used

It is not recommended to use table hints

PE007
QUERY HINT is used

It is not recommended to use query hints

PE008
SET NOCOUNT OFF is used

It is not recommended to set NOCOUNT to OFF

PE009
No SET NOCOUNT ON before DML

It is recommended to set NOCOUNT to ON before any DML statements

PE010
Interleaving DDL and DML in stored procedure/trigger.

It is not recommended to mix DML and DDL statement because recompilation issues may arise

PE011
PRINT statement is used in trigger

Trigger should not return data back to a client.

PE012
Setting ANSI_DEFAULTS ANSI_NULLS ANSI_PADDING ANSI_WARNINGS CONCAT_NULL_YIELDS_NULL lead to procedure recompilation (only in proc/trigger)

Setting this option from within batch leads to batch recompilation.

PE013
Incorrect usage of COUNT()

It is not recommended to use COUNT() in such manner. Use [NOT] EXISTS() instead.

PE014
SET FORCEPLAN used

It is not recommended to use SET FORCEPLAN OFF because of possibility of performance degradation.

PE015
No FETCH FIRST/LAST/PRIOR, but cursor is not declared as forward only

It is recommended to declare cursor with appropriate scroll options(FORWARD_ONLY,FAST_FORWARD etc).

PE016
Cursor is opened but is not deallocated

It is recommended to deallocate a cursor explicitly.

PE017
Incorrect usage of const UDF

It is not recommended to use the UDF that returns const value in JOIN, WHERE clauses or in select list. It is better to store the UDF value in a variable.

PE018
No update/delete operation on cursor, but the cursor is not declared as readonly

It is recommended to declare a cursor as readonly if no UPDATE or DELETE at the cursor position is planned.

PE019
Consider using [NOT] EXISTS instead of [NOT] IN (subquery).

Consider using [NOT] EXISTS instead of [NOT] IN (subquery).

Script issues

SC001
Script should end with GO

Script should end with GO

SC002
Script should end with empty line

Script should end with empty line

SC003
There should be no USE statement in batch

There should be no USE statement in batch

Style issues

ST001
Old-style join is used (...from table1,table2...)

Use ANSI-style joins via JOIN

ST002
Old-style column alias via EQUAL sign

It is recommended to specify alias via AS

ST003
Procedure body not enclosed with BEGIN...END

It is recommended to enclose a routine body in BEGIN...END block.

ST004
SQL-92 style cursor declaration is used

Use extended syntax instead

ST005
IF or ELSE without BEGIN...END block

It is recommended to use BEGIN...END as a wrapper for a block of code in IF or ELSE statements.

ST006
Old-style TOP clause is used

It is recommended to use new style TOP clause - TOP(n).

ST007
Cursor name is reused

More than one cursor has the same name.

ST008
Non-named parameter style used

Use named parameters when calling procedure (exec dbo.Prcoedure @Parameter1=value,@parameter2=...). Issue registered once per procedure call

ST009
Avoid using GOTO to improve readability

Avoid using GOTO to improve readability

ST010
Use alias for all table sources

Use alias for all table sources

ST011
Consider using table variable instead of temporary table

Consider using table variable instead of temporary table

ST012
Consider using temporary table instead of table variable

Consider using temporary table instead of table variable

ST013
Non-ANSI NOT_EQUAL operator used (!=)

Use ANSI-style NOT_EQUAL operator (<>)