Oracle commit usage

Source: Internet
Author: User

The first bug fix uses the Oracle update statement.

Update Table1 set web =-1 where progid = n'000000'

Codereview

Do we need a commit; in the Oracle version?

I checked Oracle commit usage online

Commit

Purpose

UseCOMMITStatement to end your current transaction and make permanent all changes stored med in the transaction. A transaction is a sequence of SQL statements that Oracle Database treats as a single unit. this statement also erases all savepoints in the transaction and releases transaction locks.

Until you commit a transaction:

  • You can see any changes you have made during the transaction by querying the modified tables, but other users cannot see the changes. after you commit the transaction, the changes are visible to other users 'statements that execute after the commit.

  • You can roll back (UNDO) any changes made during the transaction withROLLBACKStatement (see rollback.

Oracle Database issues an implicitCOMMITBefore and after any Data Definition Language (DDL) statement.

You can also use this statement

  • Commit an in-doubt Distributed Transaction manually

  • Terminate a read-only transaction begun bySET TRANSACTIONStatement

Oracle recommends that you explicitly end every transaction in your application programs withCOMMITOrROLLBACKStatement, including the last transaction, before disconnecting from Oracle database. If you do not explicitly commit the transaction and the program terminates abnormally, then the last uncommitted transaction is automatically rolled back.

A normal exit from most Oracle utilities and tools causes the current transaction to be committed. A normal exit from an oracle precompiler program does not commit the transaction and relies on Oracle database to roll back the current transaction.

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.