Short answer: It is a restriction imposed by Oracle.
Not so short: If transaction control commands (commit/rollback) were allowed in database triggers, then other programs or stored procedures/functions would not have control over their own transactions. They would not have a way to decide when to commit or rollback their operations.
For example, if a program performs an insert into a database table (which has an after insert trigger with a commit, it that were allowed), and then the program realizes that other required operations cannot be completed, and thus the whole transaction has to be rolled back. What would happen ? The insert has already been committed, so it cannot be rolled back, and thus, the transaction atomicity has been lost.
Last Wiki Answer Submitted: February 2, 2012 3:44 pm by carlosdl63,535 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
Commit and Roll back is internally used by oracle