What is a trigger ?

Answer Posted / madhuri

Triggers are basically PL/SQL procedures that are associated
with tables, and are fired whenever a certain modification
(event) occurs. The modification statements may include
INSERT, UPDATE, and DELETE.

The general structure of triggers is:
CREATE [OR REPLACE]TRIGGER trigger_name
BEFORE/AFTER
INSERT/UPDATE/DELETE ON tablename
[FOR EACH ROW [WHEN (condition)]]
BEGIN
...
END;

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba

641


Can you have more than one trigger on a table?

530


What is the difference between sql and t sql?

533


Explain select statements in sql?

584


How to read/write files from pl/sql?

578






What is the difference between joins?

534


Write a query to find the names of users that begin with "um" in sql?

501


Write a sql query to get the third highest salary of an employee from employee_table?

631


How can triggers be used for the table auditing?

592


What if we write return in procedure?

785


What is difference between stored procedures and application procedures?

567


How many types of privileges are available in sql?

735


what are the authentication modes in sql server? How can it be changed? : Sql dba

699


Where do we use pl sql?

549


how to get help information from the server? : Sql dba

526