21.10.2013 Views

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CREATE OR ALTER TRIGGER<br />

Available in: DSQL<br />

Added in: 1.5<br />

DDL statements<br />

Description: If the trigger does not yet exist, it is created just as if CREATE TRIGGER were used. If it already<br />

exists, it is altered and recompiled. Existing permissions and dependencies are preserved.<br />

Syntax: Exactly the same as for CREATE TRIGGER.<br />

DROP TRIGGER<br />

Available in: DSQL, ESQL<br />

Restriction on dropping used triggers<br />

Changed in: 2.0, 2.0.1<br />

Description: In <strong>Firebird</strong> 2.0 only, a restriction is in place which prevents anyone from dropping, altering or<br />

recreating a trigger or stored procedure if it has been used since the database was opened. This restriction has<br />

been removed again in version 2.0.1. Still, performing these operations on a live database is potentially risky<br />

and should only be done with the utmost care.<br />

DROP TRIGGER no longer increments table change count<br />

Changed in: 1.0<br />

Description: In contrast to InterBase, <strong>Firebird</strong> does not increment the metadata change counter of the associated<br />

table when CREATE, ALTER or DROP TRIGGER is used. For a full discussion, see ALTER TRIGGER no longer<br />

increments table change count.<br />

RECREATE TRIGGER<br />

Available in: DSQL<br />

Added in: 2.0<br />

Description: Creates or recreates a trigger. If a trigger with the same name already exists, RECREATE TRIGGER<br />

will try to drop it and create a new trigger. RECREATE TRIGGER will fail if the existing trigger is in use.<br />

Syntax: Exactly the same as CREATE TRIGGER.<br />

52

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!