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 are the qualities of 2nf?
What are the syntax and use of the coalesce function?
explain commit and rollback in mysql : sql dba
what are date and time data types in mysql? : Sql dba
How do I run a sql query in pgadmin 4?
What are sql ddl commands?
What is pl sql block in dbms?
What are the uses of merge?
what is offset-fetch filter in tsql? : Transact sql
Is it possible to create startup or shutdown trigger for on-schema?
What is the benefit of foreign key?
what is row? : Sql dba
What is Difference Between Unique and Primary Key Constraints?
Does truncate release storage space?
what are date and time data types? : Sql dba