Because it wouldn't make sense? Actually you can, if you declare an autonomous transaction in your trigger, but you should only do this if you want your trigger's changes to persist even if the triggering statement is rolled back. An example might be to log attempts to update a record, whether successful or not:
SQL> create trigger emp_log
2 before update on emp
3 for each row
5 pragma autonomous_transaction;
7 insert into emp_log (empno, username, change_date ) values (:new.empno, user, sysdate );
'Because it wouldn't make sense?' you wrote this..
i know we can use autonomus transaction, but my question is..
in a normal trigger ; after performing the actions inside that trigger ;
will it get commited automatically??
i meant im calling a procedure from a trigger which tries to insert datas to a table...if im not using commit, will it get commited?
Yes, any DML performed by the trigger, or by procedures called by the trigger, is part of the same transaction as the triggering statement. It is either all committed, or all rolled back, with the triggering statement. This ensures that database consistency is maintained.