DROP RULE

Delete the rewrite rule.

Summary

DROP RULE [IF EXISTS] name ON table_name [CASCADE | RESTRICT]

describe

DROP RULE Rewrite rules in tables or views.

Parameters

IF EXISTS

  • If the rule does not exist, please do not report an error. In this case, a notification will be issued.

name

  • The name of the rule to be deleted.

table_name

  • The name of the table or view to which the rule applies (can be specified by the schema).

CASCADE

  • Automatically delete objects that depend on rules.

RESTRICT

  • If any object depends on the rule, the rule is denied. This is the default value.

Example

Delete the rewrite rules on the table sales_2006:

DROP RULE sales_2006 ON sales;

compatibility

DROP RULE is an extension of the YMatrix database language, and the same is true for the entire query rewrite system.

See also

ALTER RULE, CREATE RULE