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
How do you use collections in procedure to return the resultset?
What is %type in pl sql?
What is the difference between inner join and natural join?
What is error ora-12154: tns:could not resolve the connect identifier specified?
What are inner and outer joins examples of both?
What is the use of primary key?
When you have to use a default "rollback to" savepoint of plvlog?
What are the most important characteristics of pl/sql?
What is pl sql script?
What are the different sql commands?
What are the advantages of pl sql over sql?
What is the use of double ampersand (&&) in sql queries? Give an example
Is sql microsoft?
how many sql dml commands are supported by 'mysql'? : Sql dba
What schema means?