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

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 the most important ddl statements in sql are?

1042


Is left join and outer join same?

1114


What is the maximum size of sqlite database?

1153


What is materialized view. What are different methods of refresh?

1437


What is a null value?

1186


where are cookies actually stored on the hard disk? : Sql dba

1079


How subquery works in sql?

1126


How many types of literals are available in pl sql?

1166


How can we make an if statement within a select statement?

1062


Is sql an operating system?

1071


What is sql injection owasp?

1113


Does sql*plus also have a pl/sql engine?

1131


what is cursor. write example of it. What are the attributes of cursor.

1460


What is normalization in a database?

1196


What is the starting oracle error number?

1094