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 phantom deadlock.
what are the different kinds of indexing?
What is dbms_output put_line?
What are the different types of modeling?
Explain what are service-specific middleware?
If you need to refresh a website page every time a record is updated in database, how would you do it?
What is dbms function?
What is type of end users?
What do databases contain?
What is a field in database?
How do you start a database?
What is sql in dbms?
How index hunting contributes in improving the query performance?
What will be the maximum size of an extent of a segment if the tablepac's default storage values are specified as (initial 8K next 16k minextent 4 pctincrease 100).Explain.
Explain about cursors?