Can we use commit or rollback in trigger? If yes, then how. Please explain with a suitable example?
Answer Posted / nitinsharma06
Yes we can, the trigger will get compile also if you use commit inside it and that is without using PRAGMA AUTONOUMS TRANSACTION, but when you execute the DML operation it fails to execute.
So in compilation you won't get any error and while execute trigger will throw error.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why do we need unique key in a table?
Are stored procedures compiled?
Why do we need databases?
Is a secondary key the same as a foreign key?
Difference between table function and pipelined function?
What is the syntax to add a record to a table?
Can you have more than one trigger on a table?
what is the difference between truncate and drop statements? : Sql dba
Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?
What is scalar function?
When is the update_statistics command used?
what is the different between now() and current_date()? : Sql dba
What is set transaction?
How to prepare for oracle pl sql certification?
What is pl/sql table? Why it is used?