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
Explain the purpose of %type and %rowtype data types?
Can you join a table to itself?
tell me about various levels of constraint. : Sql dba
What is query execution plan in sql?
Can we use two order by clause in query?
What is the use of nvl function?
Can I learn sql in a week?
How to connect a sql*plus session to an oracle server?
what does the t-sql command ident_incr does? : Transact sql
how to rename an existing column in a table? : Sql dba
What is the life of an sql statement?
Is sqlite good enough for production?
what is 'trigger' in sql? : Sql dba
What is user in sql?
What is the use of sqldataadapter?