Drop a trigger

2023-10-24 09:23:03  Updated

You can execute the DROP TRIGGER statement to drop a trigger.

Before you drop a trigger, make sure that you have privileges on the associated table of this trigger. If you drop a table, the trigger associated with this table is also dropped.

Syntax for dropping a trigger:

obclient>DROP TRIGGER [IF EXISTS] [database_name.]trigger_name;

Parameters:

  • IF EXISTS: indicates that if the specified trigger exists, the system drops the trigger.

  • database_name: the database name. This is an optional parameter. If no database is specified, the trigger is dropped from the current database.

Example:

obclient>DROP TRIGGER test.test_trg;

Contact Us