drop rule

Description

Removes a user-defined rule.

Syntax

drop rule [owner.]rule_name[, [owner.]rule_name] ...

Parameters

rule_name

is the name of the rule to drop. Specify the owner’s name to drop a rule of the same name owned by a different user in the current database. The default value for owner is the current user.

Examples

Example 1

Removes the rule pubid_rule from the current database:

drop rule pubid_rule

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

drop rule permission defaults to the rule owner and is not transferable.

Auditing

Values in event and extrainfo columns of sysaudits are:

Event

Audit option

Command or access audited

Information in extrainfo

30

drop

drop rule

  • Roles – current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – NULL

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

See also

Commands create rule

System procedures sp_bindrule, sp_help, sp_helptext, sp_unbindrule