Sunday 18 August 2013

More About Triggers

If a trigger is specified within the SQL*Plus shell, the definition must end with a point “.” In the last line. Issuing the command run causes SQL*Plus to compile this trigger definition. A trigger definition can be loaded from a file using the command @. Note that the last line in the file must consist of a slash “/”.
A trigger definition cannot be changed, it can only be re-created using the or replace clause.
The command drop deletes a trigger.
After a trigger definition has been successfully compiled, the trigger automatically is enabled. The command alter trigger disable is used to deactivate a trigger. All triggers defined on a table can be (de)activated using the command
alter table enable | disable all trigger;
The data dictionary stores information about triggers in the table USER TRIGGERS. The information includes the trigger name, type, table, and the code for the PL/SQL block.

No comments:

Post a Comment