Oracle Accessing updated records during the same transaction

倖福魔咒の 提交于 2019-12-31 07:34:23

问题


Using Oracle 10g

Is it possible to get the value of a newly updated field within the same transaction before it is committed.

I am executing a stored procedure which calls 2 other stored procedures.

The first stored procedure gets a record from a table and then updates that record.

The second stored procedure gets that same record but needs to use the newly updated fields from the first stored procedure.

Then the commit is carried out.

The commit can only be done if both procedures are carried out sucessfully.

Will the second stored procedure get the newly updated data or will it get a copy of the same data that was returned in the first procedure without the update ?


回答1:


Oracle has a very simple and robust implementation of read consistency:

  • a user sees the latest version of the data, including any changes made by the current transaction, but ...
  • a user cannot see the changes made by any other user until that other user issues a commit, and even then not until executing a new statement.

This is covered in the Concepts Guide. Find out more.



来源:https://stackoverflow.com/questions/13514303/oracle-accessing-updated-records-during-the-same-transaction

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