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
What is embedded sql what are its advantages?
what are integrity rules?
What is the command used to fetch the first 5 characters of a string?
what are the advantages of using stored procedures? : Sql dba
How to use distinct and count in sql query? Explain
Which sql statement is used to return only different values?
Can we use pl sql in sql server?
What is basic structure of pl sql?
How many types of functions are there in sql?
What is sql partition function?
describe mysql connection using mysql binary. : Sql dba
How do you declare a user-defined exception?
What do you know by pl/sql cursors?
How can I get the number of records affected by a stored procedure?
Is there any restriction on the use of union in embedded sql?