About Oracle for update

Source: Internet
Author: User
Tags ticket

Overview

In daily life, our use of the for update is still relatively common, especially in the manual modification of data in the case of PL/SQL developer.
It is only convenient at this point, and the true meaning of the for update lacks understanding:
The for update is a special case of Oracle's manual increase in lock level and range, and Oracle's lock mechanism is a good one for various types of database lock mechanisms.
Therefore, Oracle believes that there is generally no need for users and applications to directly lock control and promotion, and even the deadlock of such a lock-related problems of the scene, mostly related to manual lifting lock.
Therefore, Oracle does not recommend using the for update as a daily development use. Moreover, in peacetime development and operation, use for update but forget to commit, will cause a lot of lock table failure.

PL/SQL Developer modifying data suggests this form: select T.*,t.rowid from table t;

"Use Scene"

When you need business-level data exclusivity, consider using a for update.

On the scene, such as train tickets booking, the screen shows a ticket, while the actual ticket, you need to re-determine that the data is not modified by other clients. So, in this confirmation process, you can use the for update.

About Oracle for update

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.