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
What is a primary key called that is made up of more than one field?
Is ms sql is free?
What is field delimiter?
Is join and inner join the same?
Why do we use triggers?
Can primary key be changed?
What is the difference between a primary key and a clustered index?
Why is sql important?
what are the advantages and disadvantages of views in a database? : Sql dba
what is the difference between inner and outer join? Explain with example. : Sql dba
Is sql a oracle?
What is a procedure in pl sql?
Is sql a backend?
Which constraints we can use while creating database in sql?
How to use sql statements in pl/sql?