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 delete command in sql?
What are different types of keys?
How delete a row in sql?
What is clause?
How do I remove duplicates in two columns?
How many types of privileges are available in sql?
What is t sql in sql server?
What is record in pl sql?
what is the command used to fetch first 5 characters of the string? : Sql dba
How to call a javascript function from pl sql?
Which software is used for pl sql programming?
Why do we need sharding?
When to use inner join and left join?
Does inner join return duplicate rows?
What are the features of pl sql?