Is it possible to use Transactional control statements in
Database ?

Answers were Sorted based on User's Feedback



Is it possible to use Transactional control statements in Database ?..

Answer / 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

Is it possible to use Transactional control statements in Database ?..

Answer / guest

no, it is not possible to use Transactional control
statements in Database Triggers

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Database Management Interview Questions

i need query for displaying the eno,ename in a table from row 2 to row 5

1 Answers  


What are the various normalizations in database?

0 Answers   NIIT,


What is the use of RECORD LENGTH option in EXP command ?

2 Answers  


What is the difference between a shared lock and exclusive lock?

0 Answers  


Explain about the case statement present in stored procedure?

0 Answers  






what is the difference between unique and primary key

5 Answers  


What is On-line Redo Log?

2 Answers  


What is the purpose of normalisation?

0 Answers  


What will the SHOW_ALERT function returns ?

3 Answers   College School Exams Tests, DSS,


What is oracle block?

0 Answers  


What are the examples of database?

0 Answers  


What is a database in business?

0 Answers  


Categories