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 the purpose of normalization in dbms?
What is the purpose of a database?
What are the restrictions applicable while creating views?
What is join? Mention its types.
What is the relationship?
What is cliques? What is vdisk and how it will communicate with physical data storage at the time of data retrieval through amp?
What is system catalog or catalog relation?
What is a clustered database?
Discuss some of the techniques that can be used to tune operational performance.
Define RDBMS.
What does fill factor concept mean with respect to indexes?
What is the best free database software?
What are the four objects in a database?
What are the applications of database management system?
Explain, why is rdbms better than dbms?