SA0160 : Deprecated use of @, @@, or names that begin with @@ as Transact-SQL identifiers

The topic describes the SA0160 analysis rule.

Message

Deprecated use of @, @@, or names that begin with @@ as Transact-SQL identifiers

Description

The rule checks for use of @ or @@ or names that begin with @@ as identifiers.

How to fix

Rename the reported identifier in a way that it does not start with `@`.

Scope

The rule has a Batch scope and is applied only on the SQL script.

Parameters

Rule has no parameters.

Remarks

The rule does not need Analysis Context or SQL Connection.

Effort To Fix
3 minutes per issue.
Categories

Design Rules, Naming Rules, Deprecated Features, Bugs

Additional Information
Example Test SQL
SQL
1declare @ as int, @@ as int, @@a bit ,@@b int

Analysis Results
  Message Line Column
1 SA0160 : Deprecated use of @, @@, or names that begin with @@ as Transact-SQL identifiers. 1 8
2 SA0160 : Deprecated use of @, @@, or names that begin with @@ as Transact-SQL identifiers. 1 18
See Also

Other Resources