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 are the qualities of 2nf?

1035


What are the syntax and use of the coalesce function?

1198


explain commit and rollback in mysql : sql dba

1010


what are date and time data types in mysql? : Sql dba

965


How do I run a sql query in pgadmin 4?

959


What are sql ddl commands?

1084


What is pl sql block in dbms?

1001


What are the uses of merge?

1161


what is offset-fetch filter in tsql? : Transact sql

943


Is it possible to create startup or shutdown trigger for on-schema?

1021


What is the benefit of foreign key?

1020


what is row? : Sql dba

1224


What is Difference Between Unique and Primary Key Constraints?

1103


Does truncate release storage space?

1071


what are date and time data types? : Sql dba

981