Bind Rules

After you have created a rule, use sp_bindrule to link the rule to a column or user-defined datatype.

Here is the complete syntax for sp_bindrule:

sp_bindrule rulename, objname [, futureonly] 

The rulename is the name of the rule created with create rule. The objname is the name of the table and column, or of the user-defined datatype to which the rule is to be bound. If the parameter is not of the form table.column, it is assumed to be a user datatype.

Use the optional futureonly parameter only when binding a rule to a user-defined datatype. All columns of a specified user-defined datatype become associated with the specified rule unless you specify futureonly, which prevents existing columns of that user datatype from inheriting the rule. If the rule associated with a given user-defined datatype has previously been changed, SAP ASE maintains the changed rule for existing columns of that user-defined datatype.

After you define a rule, the source text describing the rule is stored in the text column of the syscomments system table. Do not remove this information; doing so may cause problems for future versions of SAP ASE. Instead, encrypt the text in syscomments by using sp_hidetext. See the Reference Manual: Procedures.

These restrictions apply:
Related concepts
Compiled Objects