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
Explain the commit statement.
Which query operators in sql is used for pattern matching?
How to start the command-line sql*plus?
How do I upgrade sql?
what is union, minus and interact commands? : Sql dba
What is the use of pl/sql table?
How do you declare a user-defined exception?
Why is %isopen always false for an implicit cursor?
How do I run pl sql in sql developer?
Which command is used to delete a trigger?
Can you inner join the same table?
Explain 3 basic parts of a trigger.
how to escape special characters in sql statements? : Sql dba
How to run sql functions in pl/sql?
How many types of primary keys are there?