commit after select

跟風遠走 提交于 2019-12-04 00:14:37

If you did a SELECT ... FOR UPDATE; you would need a COMMIT or ROLLBACK to release the records held for update. Otherwise, I can't think of any reason to do this.

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

  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.

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!