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

Explain the purpose of %type and %rowtype data types?

973


Can you join a table to itself?

1221


tell me about various levels of constraint. : Sql dba

1071


What is query execution plan in sql?

1246


Can we use two order by clause in query?

1015


What is the use of nvl function?

1239


Can I learn sql in a week?

1118


How to connect a sql*plus session to an oracle server?

1173


what does the t-sql command ident_incr does? : Transact sql

1123


how to rename an existing column in a table? : Sql dba

1076


What is the life of an sql statement?

1073


Is sqlite good enough for production?

1045


what is 'trigger' in sql? : Sql dba

1145


What is user in sql?

1073


What is the use of sqldataadapter?

1023