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 are the advantages of sql? Explain
Does sqlite need a server?
Why do we create stored procedures & functions in pl/sql and how are they different?
How long will it take to learn pl sql?
What is the difference between alter trigger and drop trigger statements?
What is blind sql injection?
Is microsoft sql free?
What is sql trigger example?
What is the need of a partition key?
what is the bond code in materialized view?
Does truncate free space?
What is the difference between row level and statement level trigger?
Can a primary key be a foreign key?
Does group by remove duplicates?
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?