doc-exports/docs/dws/dev/dws_06_0212.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:24:04 +00:00

5.3 KiB

DROP TRIGGER

Function

DROP TRIGGER deletes a trigger.

Precautions

Only the owner of a trigger and system administrators can run the DROP TRIGGER statement.

Syntax

1
DROP TRIGGER [ IF EXISTS ] trigger_name ON table_name [ CASCADE | RESTRICT ];

Parameter Description

  • IF EXISTS

    Sends a notice instead of an error if the specified trigger does not exist.

  • trigger_name

    Specifies the name of the trigger to be deleted.

    Value range: an existing trigger

  • table_name

    Specifies the name of the table where the trigger to be deleted is located.

    Value range: an existing table having a trigger

  • CASCADE | RESTRICT
    • CASCADE: Deletes objects that depend on the trigger.
    • RESTRICT: Refuses to delete the trigger if any objects depend on it. This is the default.

Examples

Delete the trigger insert_trigger:

1
DROP TRIGGER insert_trigger ON test_trigger_src_tbl;