Enabling Triggers and Disabling triggers Assignment Help

Assignment Help: >> Triggers - Enabling Triggers and Disabling triggers

Enabling Triggers and Disabling triggers:

By default, all triggers are automatically enabled when they are created. Moreover, they can be disabled. Once a task is finished, the trigger can be re-enabled. An Enabling and disabling triggers are performed using enable and disable keywords.

Syntax:

ALTER TRIGGER <triggername> ENABLE|DISABLE;

Example:

ALTER TRIGGER empdel DISABLE;

For an exacting table, all triggers can be enabled using a single command. ALTER TABLE <tablename> DISABLE ALL TRIGGERS;

Dropping triggers:

Triggers are dropped using the Drop Trigger Command. The syntax is as given below:

Syntax:

DROP TRIGGER <triggername>;

Example:

DROP TRIGGER chkprod;

Restrictions on Triggers:

Even-though there are several benefits in which a trigger can provide there are still some restrictions in using Triggers.

Trigger body cannot contain COMMIT or ROLLBACK statements. A Trigger body must hold   keyword   DECLARE   for   declarative section   unlike   Subprograms. Trigger specification must not hold any IS/AS keywords.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd