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 the use of index in hive?

727


how is myisam table stored? : Sql dba

782


what are the security recommendations while using mysql? : Sql dba

765


what are the types of join and explain each? : Sql dba

768


what is a trigger in mysql? Define different types of trigger. : Sql dba

729






what are the disadvantages of mysql? : Sql dba

761


Why left join is used in sql?

700


Is sql port 1433 encrypted?

778


What does pl sql developer do?

683


Is pl sql and postgresql same?

767


How can I tell if sql is running?

761


what are date and time functions in mysql? : Sql dba

714


What are the parts of a sql statement?

763


How to run sql*plus commands in sql developer?

800


What is oracle pl sql developer?

706