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 are the importance of partitioning in dbms?
how Data is stored in a file so that Direct Searching can be performed
What is the advantage of database management system?
What are the various kinds of interactions catered by dbms?
What are the different types of database keys?
What is tuple in dbms?
What is the purpose of sql?
Single File Database: Develop a student record management program, which uses single file as its database. It is not supposed to create additional files at any part of the project and should never rewrite total content. It must be capable of storing 100000's of records. It should support variable length records to be added, deleted, modified, listed.
What are the applications of database?
What is trigger in dbms?
What do you understand by e-r model?
Is filemaker pro a relational database?
Can you explain the 'between' clause?
What are its two major subsystems of r?
What is the easiest database to learn?