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 two types of cursors in pl sql?
What are stored procedures in mysql?
What is the maximum number of rows in sql table?
what are dynamic queries in t-sql? : Transact sql
What is dense_rank in sql?
Explain character-manipulation functions?
What is sql data?
What is an exception in pl/sql?
What is sqlite used for?
What is an ndf file?
What is the difference between left join and right join?
What is the usage of nvl function?
What is column?
Write a unique difference between a function and a stored procedure.
Explain spool.