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 / hr@tgksolutions.com

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 is a table partition?

1106


Why is the cursor important?

1023


How do I restart sql?

950


How do I start pl sql?

932


Can we use distinct and group by together?

1026


what is meant by nl2br()? : Sql dba

1011


How to disable a trigger name update_salary?

1252


What does trigger mean in slang?

1033


What is difference between left and right outer join?

969


What happens when a trigger is associated to a view?

897


How many types of functions are there in sql?

932


Why do we need cursor in pl sql?

1121


Which operator is used in query for pattern matching?

1072


Can we join two tables without common column?

986


Why do we need pl sql?

956