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 / glibwaresoftsolutions

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 scheduled jobs or what is a scheduled tasks? : Sql dba

904


What is constant in pl sql?

965


in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.

2020


What are the advantages of sql? Explain

1048


What does seeding a database mean?

888


Are dml statements autocommit?

980


How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?

987


What is sql profiling in oracle?

992


What is the difference between pl and sql?

1031


What is the difference between delete and truncate statement in sql?

1007


what is the use of double ampersand (&&) in sql queries?

1114


Is join same as left join?

975


What is sql and its types?

1108


define join and explain different type of joins? : Sql dba

897


what is self join and what is the requirement of self join? : Sql dba

1075