Click or drag to resize

SA0215 : The CREATE RULE and DROP RULE statements are deprecated

The topic describes the SA0215 analysis rule.

Message

The CREATE RULE and DROP RULE statements are deprecated

Description

The rule checks T-SQL code and reports usages of the deprecated CREATE RULE and DROP RULE statements.

It is recommended to replace the rule statements with CHECK constraint in CREATE TABLE or ALTER TABLE statements.

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

Additional Information
Example Test Script
SQL
1CREATE RULE list_rule  
2AS   
3@list IN ('1389', '0736', '0877');

Analysis Results

 MessageLineColumn
1SA0215 : The CREATE RULE and DROP RULE statements are deprecated.10
See Also

Other Resources