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 delete command in sql?

1111


What are different types of keys?

1106


How delete a row in sql?

992


What is clause?

1151


How do I remove duplicates in two columns?

1065


How many types of privileges are available in sql?

1350


What is t sql in sql server?

1074


What is record in pl sql?

1083


what is the command used to fetch first 5 characters of the string? : Sql dba

1638


How to call a javascript function from pl sql?

1139


Which software is used for pl sql programming?

986


Why do we need sharding?

989


When to use inner join and left join?

959


Does inner join return duplicate rows?

976


What are the features of pl sql?

1067