Files
doc-exports/docs/dws/dev/dws_06_0147.html
luhuayi 177cd61a57 DWS DEVG 910.211 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: luhuayi <luhuayi@huawei.com>
Co-committed-by: luhuayi <luhuayi@huawei.com>
2025-05-05 07:44:03 +00:00

6.4 KiB

ALTER TRIGGER

Function

ALTER TRIGGER modifies the definition of a trigger.

Precautions

Only the owner of a table where a trigger is created and system administrators can run the ALTER TRIGGER statement.

Syntax

1
ALTER TRIGGER trigger_name ON table_name RENAME TO new_name;

Parameter Description

  • trigger_name

    Specifies the name of the trigger to be modified.

    Value range: an existing trigger

  • table_name

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

    Value range: an existing table having a trigger

  • new_name

    Specifies the new trigger name.

    Value range: a string that complies with the identifier naming convention. A value contains a maximum of 63 characters and cannot be the same as other triggers on the same table.

Examples

Modified the trigger delete_trigger.

1
ALTER TRIGGER delete_trigger ON test_trigger_src_tbl RENAME TO delete_trigger_renamed;

Disable the trigger insert_trigger.

1
ALTER TABLE test_trigger_src_tbl DISABLE TRIGGER insert_trigger;  

Disable all triggers on the test_trigger_src_tbl table.

1
ALTER TABLE test_trigger_src_tbl DISABLE TRIGGER ALL;