SA0228 : WITHIN is now a reserved keyword. References to objects or columns named ‘within’ will fail

The topic describes the SA0228 analysis rule.

Message

WITHIN is now a reserved keyword. References to objects or columns named ‘within’ will fail

Description

The rule checks T-SQL code for usages of the WITHIN undelimited identifier.

The WITHIN is now a reserved keyword and all references to objects or columns named ‘within’ will fail.

In order to resolve this rule violation, delimit the WITHIN identifier instances like [WITHIN].

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.

Categories

Deprecated Features, Bugs

Additional Information
Example Test Script
SQL
1select * from within
2
3select within from [within]

Analysis Results

  Message Line Column
1 SA0228 : WITHIN is now a reserved keyword. References to objects or columns named ‘within’ will fail. 1 14
2 SA0228 : WITHIN is now a reserved keyword. References to objects or columns named ‘within’ will fail. 3 7
See Also

Other Resources