Is it possible to use Transactional control statements in
Database ?
Answers were Sorted based on User's Feedback
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 |
Answer / guest
no, it is not possible to use Transactional control
statements in Database Triggers
| Is This Answer Correct ? | 0 Yes | 1 No |
What are different types of joins in the sql?
What is the Structural difference between bitmap and b-tree index ?
What is a checkpoint and When does it occur in database?
0 Answers TryTechnicals Pvt Ltd,
Explain ddl interpreter?
How do I create a database in open office?
What do you understand by the view and mention the steps to create, update and drop a view?
What is unique key example?
Why do we need foreign key?
What is data redundancy in dbms?
What is acid property in dbms?
What do you understand by cursor? Mention the different types of cursor?
What is rdbms with example?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)