drop rule

Removes a user-defined rule.

Syntax

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

Parameters

Examples

Usage

  • Before dropping a rule, unbind it using sp_unbindrule. If the rule has not been unbound, an error message appears, and the drop rule command fails.

  • You can bind a new rule to a column or user-defined datatype without unbinding its current rule. The new rule overrides the old one.

  • After you drop a rule, the SAP ASE server enters new data into the columns that were previously governed by the rule without constraints. Existing data is not affected in any way.

See also sp_bindrule, sp_help, sp_helptext, sp_unbindrule in Reference Manual: Procedures.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

The permission checks for drop rule differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be the rule owner or a user with drop any rule privilege.

Disabled

With granular permissions disabled, you must be the rule owner or a user with sa_role.

Auditing

Values in event and extrainfo columns of sysaudits are:

InformationValues
Event

30

Audit option

drop

Command or access audited

drop rule

Information in extrainfo
  • 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

Related reference
create rule