SHOW TRIGGERS

From InterBase
Jump to: navigation, search

Go Up to isql Command Reference


Lists all triggers or displays information about a specified trigger.

SHOW {TRIGGERS | TRIGGER name};
Argument Description

<name>

Name of an existing trigger in the current database

Description: SHOW TRIGGERS displays all triggers defined in the database, along with the table they depend on. SHOW TRIGGER name displays the name, sequence, type, activation status, and definition of the named trigger.

SHOW TRIGGER has a shorthand equivalent, SHOW TRIG.

Deleting a table that has a dependent trigger is not allowed. To avoid an isql error, delete the trigger (using DROP TRIGGER) before deleting the table.

Examples: To list all triggers defined for the current database, enter:

SHOW TRIGGERS;
Table name Trigger name
=========== ============
EMPLOYEE SET_EMP_NO
EMPLOYEE SAVE_SALARY_CHANGE
CUSTOMER SET_CUST_NO
SALES POST_NEW_ORDER

To display information about the SET_CUST_NO trigger, enter:

SHOW TRIG SET_CUST_NO;
Triggers:
SET_CUST_NO, Sequence: 0, Type: BEFORE INSERT, Active
AS
BEGIN
new.cust_no = gen_id(cust_no_gen, 1);
END