---
title: "DROP RULE"
url: "https://docs.yugabyte.com/stable/api/ysql/the-sql-language/statements/ddl_drop_rule/"
---

# DROP RULE

Use the DROP RULE statement to remove a rule.

## Synopsis

Use the DROP RULE statement to remove a rule.

## Syntax

- [![Grammar Icon](/icons/file-lines.svg)Grammar](#grammar-1)
- [![Diagram Icon](/icons/diagram.svg)Diagram](#diagram-1)

```output.ebnf
drop_rule ::= DROP RULE [ IF EXISTS ] rule_name ON table_name 
              [ CASCADE | RESTRICT ]
```

#### drop\_rule

DROPRULEIFEXISTS[rule\_name](/stable/api/ysql/syntax_resources/grammar_diagrams#rule-name)ON[table\_name](/stable/api/ysql/syntax_resources/grammar_diagrams#table-name)CASCADERESTRICT

## Semantics

See the semantics of each option in the [PostgreSQL docs](https://www.postgresql.org/docs/15/sql-droprule.html "PostgreSQL docs").

## Examples

Basic example.

```plpgsql
yugabyte=# CREATE TABLE t1(a int4, b int4);
yugabyte=# CREATE TABLE t2(a int4, b int4);
yugabyte=# CREATE RULE t1_to_t2 AS ON INSERT TO t1 DO INSTEAD
             INSERT INTO t2 VALUES (new.a, new.b);
yugabyte=# DROP RULE t1_to_t2 ON t1;
```

## See also

- [CREATE RULE](/stable/api/ysql/the-sql-language/statements/ddl_create_rule "CREATE RULE")
