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
What does the acronym acid stand for in database management?
What is the file extension for sql database?
Is not null in sql?
What is meant by <> in sql?
What is union and union all keyword in sql and what are their differences?
What are different types of triggers?
What is the difference between functions, procedures, and packages in pl/sql?
How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?
What happens when a trigger is associated to a view?
Is it possible for a table to have more than one foreign key?
What are triggers in sql?
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
What is the difference between subquery and correlated query?
How do you rank data in sql?
What is the difference between left join and right join?