Bind Rule/Default to Columns

SQL Server Enterprise Manager Help

SQL Server Enterprise Manager Help

Bind Rule/Default to Columns

Use this dialog box to view or specify the following options.

Options

Rule

View the name of the rule that you wish to bind to a column. When bound to a column or a user-defined data type, a rule specifies the acceptable values that can be inserted into that column.

As a backward compatibility feature, rules perform some of the same functions as check constraints. CHECK constraints, created using the CHECK keyword of ALTER or CREATE TABLE, are the recommended, standard way to restrict the values in a column. One key difference between rules and check constraints is that while multiple constraints can be defined on a column or multiple columns, only one rule can be bound to a column or user-defined data type. A column can, however, have both a rule and one or more check constraints associated with it. When this is true, all restrictions are evaluated. For more information about rules, see CREATE RULE.

Table

Select the table containing the column you wish to bind a rule to.

Unbound columns

View the names and data types of the unbound columns in the selected table.

Bound columns

View the names and data types of the bound columns in the selected table.

Add

Bind a rule to a column. You must select an unbound column from the Unbound columns list before you click Add.

Remove

Unbind a rule from a column. You must first select a bound column from the Bound columns list before you click Remove.

See Also

Creating User-Defined Data Types