ALLBASE/SQL Reference Manual (36216-90216)

Chapter 10 405
SQL Statements A - D
DROP RULE
DROP RULE
The DROP RULE statement deletes the specified rule.
Scope
ISQL or Application Programs
SQL Syntax
DROP RULE [
Owner
.]
RuleName
[FROM TABLE [
Owner
.]
TableName
]
Parameters
[
Owner
.]
RuleName
identifies the rule to be dropped.
[
Owner
.]
TableName
identifies the table the rule is defined on.
Description
If a
TableName
is specified, the rule must exist on that table or an error will be
returned.
If no
TableName
is specified, the rule is located and dropped. Since rule names are
unique per owner, not per table, there is no ambiguity in references to
RuleName
.
The DROP RULE statement invalidates stored sections that have dependencies defined
upon the table the rule is defined on. This will permit the rule to be removed when the
sections are revalidated.
The procedure a rule invokes will not be affected by the removal of that rule.
If no rule owner is specified and no table is specified, the default owner is the current
DBEUserID.
If no rule owner is specified and a table is specified, the default rule owner is the table
owner.
If a table is specified and no owner is specified for it, the default table owner is the
current DBEUserID.
The table and rule owners must be the same.
Authorization
You can issue this statement if you have OWNER authority for the rule or DBA authority.
Example
DROP RULE PurchDB.InsertReport
DROP RULE PurchDB.DeleteReport
DROP RULE PurchDB.UpdateReport