Can i use Commit inside the Trigger? Suppose i use commit
what will be happy (it's complied /executed/work)

Answer Posted / saraswathi muthuraman

Trigger will be compiled. while execution r error will occur.
To avoid this you can use PRAGMA autonomus_transaction

example :

create or replace trigger emp_test_trig
after update on emp_test
for each row
declare
PRAGMA autonomus_transaction;
begin

insert into dep_test values(100,:new.emp_id);
commit;
end;
/

Is This Answer Correct ?    18 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is view? : Sql dba

554


how to check server status with 'mysqladmin'? : Sql dba

554


What is sql key?

508


Difference between truncate, delete and drop commands?

552


What information is needed to connect sql*plus an oracle server?

579






What are aggregate functions in sql?

619


Is sql a backend language?

610


When you have to use a default "rollback to" savepoint of plvlog?

710


What are the types pl/sql code blocks?

600


What is server name sql?

576


How do I create a memory optimized filegroup?

521


What is dialect in sql?

520


What is sql integrity?

575


What is before and after trigger?

514


State some properties of relational databases?

572