Oracle for update for UPDATE nowait

Source: Internet
Author: User

Direct query.

SELECT * from A1 t;

The data taken at this time is the pre-run data, and other users do not get the data modification at the same time.

Real-time update queries

SELECT * FROM A1 t for update;

For update updates, other managers can do the data operation with update, which limits the number of users, fewer connected users, and can be used when threads are not occupied.

Wait 3 seconds to update

SELECT * FROM A1 t for update wait 3;

In the case of the lock table, update the data of other user commits, and wait 3 for the action of the right operation.

Real-time update queries

SELECT * FROM A1 t for update nowait;

For update nowait is understood literally, without waiting for updates, that is, to update in real time.

Benefits of using the for update nowait: Don't wait indefinitely for locked lines!

Locked data allows other operators to avoid more waiting and more control

Good for interactive applications! Data for multi-user operations can be saved interactively.

If skip locked is used, the locked row can be crossed, and the ' resource busy ' exception report raised by Wait n will not be reported

Oracle for update for UPDATE nowait

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.