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
How do I run a sql script?
how can we submit a form without a submit button? : Sql dba
How to get each name only once from an employee table?
What is inner join in sql?
How many clustered indexes can be created on a table?
Define the select into statement.
Is truncate ddl or dml?
Is pl sql better than sql?
hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
What is db journal file?
When to use inner join and left join?
What is the difference between partitioning and sharding?
How to load data with sql*loader?
How is debugging done?