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
Define join types.
What are the advantages of database management system?
Where is the database stored?
What is the purpose of normalisation?
Enlist various types of interactions created by dbms?
What is database url?
How big is a big database?
What is a 3nf table?
How to create student table through query with a numeric column of ID and Name of Chaeacter and D-O-B with date type in database What will be the query for this purpose?
State at least four kinds of indexing?
What is sql rdbms?
Explain the concepts of a primary key and foreign key.
What is the advantages and disadvantages of database management system?
What is the main purpose of a database?
What is database management system with example?