SA0228 : WITHIN is now a reserved keyword. References to objects or columns named ‘within’ will fail |
![]() |
The topic describes the SA0228 analysis rule.

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

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].

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

Rule has no parameters.

The rule does not need Analysis Context or SQL Connection.


Deprecated Features, Bugs


SQL
1select * from within 2 3select within from [within] |

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 |
