Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FUNCTION/TRIGGER AND COMMIT

Oracle ManiacDec 30 2012 — edited Dec 30 2012
Hello friends ,



When I relate of as to why we cannot use ddl/(dml with commit), inside a function then the below points came to my mind.

1) Since often functions are like black box to the invoker ,so if one uses a function call right in the middle of his transaction ,then the DDl/(DML with commit) can prove to be very wrong since functions can be called from within a sql statements ,which can commit a part of the transaction without the invoker knowing of it . so the alternative comes to make it an autonomous transaction and I fully agree to this .


2)But why isnt this check valid for a procedure .What i mean to say is that a procedure can be called from within some other plsql block .So why cant the above points be valid for procedures as well. I know it is not like that , but why ??


Thanks in advance and I really appreciate everyone for their reply :)
This post has been answered by jeneesh on Dec 30 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 27 2013
Added on Dec 30 2012
4 comments
992 views