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


Please Help Members By Posting Answers For Below Questions

What is trigger and how to use it in sql?

550


What is the purpose of using pl/sql?

674


What are some predefined exceptions in pl/sql?

562


What is oracle sql called?

512


How many rows can sqlite handle?

604






How would you reference column values before and after you have inserted and deleted triggers?

632


What type of join is sql join?

543


What is clustered and nonclustered index in sql?

510


what is sql profiler? : Sql dba

603


How do you sort in sql?

616


How do I start sql from command line?

545


What are the features of pl sql?

575


Can we use two order by clause in query?

557


What is difference between procedure and trigger?

530


Which operator is used in query for pattern matching?

640