Summary: in this tutorial, you will learn how to use the Db2
DROP TRIGGER statement to remove a trigger from the database.
DROP TRIGGER statement allows you to delete a trigger from the database. The syntax of the
DROP TRIGGER is the following:
DROP TRIGGER trigger_name;
In this syntax, you specify the name of the trigger which you want to delete after the
DROP TRIGGER keywords.
Db2 does not allow you to delete multiple triggers using a single
DROP TRIGGER statement. Therefore, to delete multiple triggers, you have to execute the
DROP TRIGGER multiple times.
If you delete a trigger that does not exist, you will get an error. Unfortunately, Db2 does not support the
IF EXISTS option that conditionally deletes a trigger if it exists.
The following example uses the
DROP TRIGGER statement to delete the
update_headcount trigger created in the
CREATE TRIGGER tutorial:
DROP TRIGGER update_headcount;