SA0068A : Check all Check Constraints in the current database for following specified naming convention |
![]() |
The topic describes the SA0068A analysis rule.

Check all Check Constraints in the current database for following specified naming convention

The rule checks the naming of all check constraints in the current database.
Separate name patterns are available for column level check constraints and table level check constraints.
The following placeholders will be replaced in the pattern during the key testing:
{table_name} – Name of the constraint’s parent table.
{column_name} – Target column name.
Regular expression patterns can be used, but the pattern must be prefixed with ‘regexp:’ string in order to be used as a matching regular expression.

Review the constraint name and rename it according to the naming convention.

The rule has a ContextOnly scope and is applied only on current server and database schema.

Name | Description | Default Value |
---|---|---|
ColumnConstraintNamePattern |
Column level check constraint name pattern. |
CK_{table_name}_{column_name} |
TableConstraintNamePattern |
Table level check constraint name pattern. |
regexp:CK_{table_name}_[A-Za-z_]+ |

The rule requires Analysis Context. If context is missing, the rule will be skipped during analysis.


Naming Rules, Code Smells

There is no additional info for this rule.
