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
What is openedge workgroup rdbms?
What you know in mapping of erd to dfd?
What is package in dbms?
What are the different types of modeling?
What is system catalog or catalog relation?
What is alternate key?
Which database is best for large data?
What is the 3-tier architecture?
What is rdbms architecture?
What is a relation schema?
What's the difference between clustered and non-clustered indexes?
Give us a non-computer example of preemptive and non-preemptive scheduling?
What is an optimization and performance tuning and how does it really work in practical projects?
what are the different kinds of indexing?
Is mysql a rdbms?