Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are triggers, and when would you use them?

Answer Posted / nashiinformaticssolutions

A trigger is a block of PL/SQL code automatically executed in response to certain events (e.g., INSERT, UPDATE, DELETE) on a table.
Example Trigger:
CREATE OR REPLACE TRIGGER EmployeeAudit
AFTER INSERT ON employees
FOR EACH ROW
BEGIN
INSERT INTO audit_log(employee_id, action, action_date)
VALUES (:NEW.id, 'INSERT', SYSDATE);
END;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What packages are available to pl/sql developers?

1057


What is parameter substitution in sql?

1028


How do you select unique values in sql?

997


How do I remove sql plus from windows 10?

1096


What is the maximum number of triggers, you can apply on a single table?

998


Explain commit, rollback and savepoint.

999


What are the two parts of design view?

1018


What is trigger explain with example?

1037


Is left join inner or outer?

1014


What is error ora-01000: maximum open cursors exceeded

1145


How do you go back in sql?

985


What is the difference between delete, truncate and drop command?

1151


What is sql not null constraint?

1035


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

1108


how to show all tables with 'mysql'? : Sql dba

1118