Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

DROP TRIGGER

Use the DROP TRIGGER statement to remove a trigger definition from the database.

This statement is an extension to the ANSI/ISO standard for SQL.

Syntax

Read syntax diagramSkip visual syntax diagram>>-DROP TRIGGER--+-----------+--trigger------------------------><
                 '- owner--.-'
 
Element Description Restrictions Syntax
owner Name of the owner of the trigger Must own the trigger Owner Name
trigger Name of the trigger to drop The trigger must exist in the local database Identifier

Usage

You must be the owner of the trigger or have the DBA privilege to drop the trigger. Dropping a trigger removes the text of the trigger definition and the executable trigger from the database. The row describing the specified trigger is deleted from the systriggers system catalog table.

In Dynamic Server, dropping an INSTEAD OF trigger on a complex view (a view with columns from more than one table) revokes any privileges on the view that the owner of the trigger received automatically when creating the trigger, and also revokes any privileges that the owner of the trigger granted to other users. (Dropping a trigger on a simple view does not revoke any privileges.)

The following statement drops the items_pct trigger:

DROP TRIGGER items_pct

If a DROP TRIGGER statement appears inside an SPL routine that is called by a data manipulation (DML) statement, the database server returns an error.

Related Information

Related statements: CREATE TRIGGER , DROP TABLE

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]