Removes a trigger from a table.
Synopsis
DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]Parameters
| Parameter | Description |
|---|---|
IF EXISTS | Suppresses an error if the trigger does not exist. A notice is issued instead. |
name | The name of the trigger to remove. |
table_name | The name of the table the trigger is defined on. Optionally schema-qualified. |
CASCADE | Automatically drops objects that depend on the trigger, and in turn all objects that depend on those objects. |
RESTRICT | Refuses to drop the trigger if any objects depend on it. This is the default. |
Examples
Drop the trigger if_dist_exists on the table films:
DROP TRIGGER if_dist_exists ON films;