Redian新闻
>
Is there table level commit?
avatar
Is there table level commit?# Database - 数据库
r*l
1
I am new to PL/SQL so if this question is stupid, don't blame me.
I am writing a PL/SQL procedure to operation on a table, say T_OPR.
I want to write the log information to another table, say T_LOG.
The operations on T_OPR should be rollback-ed if there is a single error.
When this happened, I still want to info in T_LOG to be committed.
If there any way to do it? Thanks a lot.
avatar
n*a
2
Use autonomous transaction.
" target="_blank" class="a2">http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/06_ora.htm#27440

【在 r*****l 的大作中提到】
: I am new to PL/SQL so if this question is stupid, don't blame me.
: I am writing a PL/SQL procedure to operation on a table, say T_OPR.
: I want to write the log information to another table, say T_LOG.
: The operations on T_OPR should be rollback-ed if there is a single error.
: When this happened, I still want to info in T_LOG to be committed.
: If there any way to do it? Thanks a lot.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。