Removes a user-defined rule.
drop rule [owner.]rule_name[, [owner.]rule_name] ...
drop rule pubid_rule
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.
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for drop rule differ based on your granular permissions settings.
Setting | Description |
---|---|
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. |
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 30 |
Audit option | drop |
Command or access audited | drop rule |
Information in extrainfo |
|