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 is a scheduled jobs or what is a scheduled tasks? : Sql dba
What is constant in pl sql?
in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.
What are the advantages of sql? Explain
What does seeding a database mean?
Are dml statements autocommit?
How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?
What is sql profiling in oracle?
What is the difference between pl and sql?
What is the difference between delete and truncate statement in sql?
what is the use of double ampersand (&&) in sql queries?
Is join same as left join?
What is sql and its types?
define join and explain different type of joins? : Sql dba
what is self join and what is the requirement of self join? : Sql dba