选择后提交 [英] commit after select

查看:73
本文介绍了选择后提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于DB2和MySQL,在select语句后可能需要commit的情况下,我已经阅读了以下说明:

I have read the explanations when a commit may be neccessary after a select statement for DB2 and MySQL:

在以下位置的select查询是否需要提交DB2?

我应该在一次选择后提交

我的问题是使用Oracle执行select语句后,何时以及为什么对commit重要?

My question is when and why would it be important to commit after executing a select statement using Oracle?

推荐答案

只有少数几种情况我可以想到,您可能希望在选择后提交.

there are only a few situations that I can think of that you may want to commit after a select.

  1. 如果您的选择正在加入数据库链接,则将创建一个事务.如果您尝试关闭此链接,除非提交/回滚了该交易,否则会收到错误消息.

  1. if your select is joining on database links, a transaction will be created. if you attempt to close this link, you'd get an error unless you committed/rolled back the transaction.

选择更新(如DCookie所述)以释放锁.

select for update (as DCookie says) to release the locks.

删除序列化隔离级别(如果已设置)或添加一个(如果您在调用此链接之前已从数据库链接中进行选择).

to remove an serialized isolation level if set or to add one, if you've been selecting from db links prior to invoking this.

这篇关于选择后提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆