Is it possible to use Transactional control statements in
Database ?
Answer Posted / ddrema
It's posible and mandatory if you use AUTONOMOUS
TRANSACTION in the TRIGGER.
like this:
CREATE OR REPLACE TRIGGER audit_sal
BEFORE UPDATE OF salary ON employees FOR EACH ROW
DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO emp_audit VALUES( :old.employee_id, SYSDATE,
:new.salary, :old.salary );
COMMIT;
END;
/
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain ddl interpreter?
Can you explain fourth normal form and fifth normal form ?
What is database url?
What is pdo in database?
What is ordbms with example?
Enlist the advantages of dbms.
What do you understand by correlated subqueries in dbms?
Explain the difference between physical and logical data independence?
Can you drop all the columns of a table ?
What is the biggest advantage of rdbms?
What are database modules?
What is index hunting?
How does notification services work?
What are the limitations of rdbms?
What are database functions?