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 trigger price?

926


Is left join inner or outer by default?

975


What are the different types of sql commands?

1064


What is trigger in sql? Explain

944


What does the argument [or replace] do?

1017


Show the cursor attributes of pl/sql.

998


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

946


How does an execution block start and end in pl sql?

901


What does the hierarchical profiler does?

1005


What is auto increment feature in sql?

1068


How to look at the current sql*plus system settings?

1082


What is linq to sql?

1061


Which operator is used in query for pattern matching?

1034


What are pl sql procedures?

965


When sql appeared?

1025