sp_unbindrule

Unbinds a rule from a column or from a user-defined datatype.

Syntax

sp_unbindrule objname [, futureonly [, “accessrule” | “all”]]

Parameters

Examples

Usage

There are additional considerations when using sp_unbindrule:
  • Executing sp_unbindrule removes a rule from a column or from a user-defined datatype in the current database. If you do not want to unbind the rule from existing objname columns, use futureonly as the second parameter.

  • You cannot use sp_unbindrule to unbind a check constraint. Use alter table to drop the constraint.

  • To unbind a rule from a table column, specify the objname argument in the form “table.column”.

  • The rule is unbound from all existing columns of the user-defined datatype unless the rule has been changed or the value of the optional second parameter is futureonly.

  • To display the text of a rule, execute sp_helptext with the rule name as the parameter.

See also create rule, drop rule in Reference Manual: Commands.

Permissions

You must be the table owner or datatype owner to execute sp_unbindrule. Permission checks do not differ based on the granular permissions settings.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Related reference
sp_bindrule
sp_helptext