hi ,
pls send immediatly
hi ,
pls send immediatly
A trigger is a function containing sql statements/commands which will be executed when a predefined condition occurs. Its same like functions in other programming languages but here it is made up of sql statements/commands instead of program commands.
An example of a simple before statement-level trigger that displays a message prior to an insert operation on the emp table.
Create or replace trigger emp_alert_trig ......................; trigger name
before insert on emp ................................................; action which starts this trigger
begin....................................................................... ; commands to be executed.
Dbms_output.put_line('new employees are about to be added');
end;
Last edited by Haitalk; 04-04-2007 at 02:45 AM.
Regards,
Anoop :)
If its useful, dont forget to [COLOR="Red"]THANK[/COLOR] me :cool:
A trigger is a block of statements that includes a set of SQL statements. Statements in a trigger are activated or executed in response to data modification operations. A trigger defined on a table is fired when data modification statements, such as insert, update, or delete, modify data in that table
Triggers maintain the consistency of related data in a table. As a result, triggers maintain referential integrity of data in a database. Referential integrity ensures that each primary key in a table has a corresponding foreign key that matches exactly with the primary key. A primary key is a unique identifier in a table.
Triggers are fired automatically. They are specific to data modification commands, such as insert, update, and delete. Triggers are fired when you execute data modification statements. You can roll back both a trigger and the SQL statement that fires the trigger in a single transaction in the trigger. The entire transaction is rolled back if an error occurs.
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.
An action causing the automatic invocation of a procedure, for instance to preserve {referential integrity}. A triggers goes into effect when a user attempts to modify data with an insert, delete, or update command. A trigger can instruct the system to take any number of actions when a specified change is attempted. By preventing incorrect, unauthorized, or inconsistent changes to data, triggers help maintain the integrity of the database.
A database trigger is procedural code that is automatically executed in response to certain events on a particular table in a database.
A trigger can also used for execution of stored procedures at required times.
Regards,
Brijesh Jain
---------------------------------------------------------
Connect with me on Skype: jainbrijesh
Google Plus : jainbrijeshji
Hi,
I will tell u simple answer for trigger. Trigger is a special type of stored procedure it can be called implicitly when ever u perform DML operations(Insert,Delete,Update) on to the table.
Regards,
hari prasad
A trigger is an event handler against some specific event.
when that event is raised a code is executed
it is in object in database which is automatically executed at the specified event.
3 types triggers are there
DML triggers
DDL triggers
Database triggers