inventors wrote:
Hi.. it's me inventors..oracle 9i.. can i use commit inside of trigger..
by www.inventorstechnologies.com |
Hello,
Firstly, we know what is trigger mean: A trigger (from the Dutch
trekken, meaning
to pull) is a lever which, when pulled by the finger, releases the hammer on a firearm.
In a database, a trigger is a set of Structured Query Language
(
SQL)
statements that automatically "fires off" an action
when a specific operation, such as changing data in a table, occurs. A
trigger consists of an event (an INSERT, DELETE, or UPDATE statement
issued against an associated table) and an action (the related
procedure). Triggers are used to preserve data integrity by checking on
or changing data in a consistent manner.
Use the
CREATE TRIGGER statement to create and enable a
database trigger, which is:
-
A stored PL/SQL block associated with a table, a schema, or the database or
-
An anonymous PL/SQL block or a call to a procedure implemented in PL/SQL or Java
Oracle Database automatically executes a trigger when specified conditions occur.
When you create a trigger, the database enables it automatically. You can subsequently disable and enable a trigger with the DISABLE and ENABLE clause of the ALTER TRIGGER or ALTER TABLE statement.
Thanks