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
What is a table partition?
Why is the cursor important?
How do I restart sql?
How do I start pl sql?
Can we use distinct and group by together?
what is meant by nl2br()? : Sql dba
How to disable a trigger name update_salary?
What does trigger mean in slang?
What is difference between left and right outer join?
What happens when a trigger is associated to a view?
How many types of functions are there in sql?
Why do we need cursor in pl sql?
Which operator is used in query for pattern matching?
Can we join two tables without common column?
Why do we need pl sql?