Removes a user-defined rule.
drop rule [owner.]rule_name[, [owner.]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.
Removes the rule pubid_rule from the current database:
drop rule pubid_rule
Before dropping a rule, you must 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, Adaptive Server enters new data into the columns that were previously governed by the rule without constraints. Existing data is not affected in any way.
ANSI SQL – Compliance level: Transact-SQL extension.
drop rule permission defaults to the rule owner and is not transferable.
Values in event and extrainfo columns of sysaudits are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
30 |
drop |
drop rule |
|
Commands create rule
System procedures sp_bindrule, sp_help, sp_helptext, sp_unbindrule