12-SQLite transactions and 12-sqlite transactions

Source: Internet
Author: User

12-SQLite transactions and 12-sqlite transactions
I. Transaction Overview

A transaction is a series of operations performed as a single logical unit. Multiple operations are submitted to the system as a whole, either executed or not executed. transactions are an inseparable logical unit of work.

Ii. execution of transactions

Begin: Start transaction

Rollback: roll back the transaction

Commit: Submit a transaction

Note: what is "rollback transaction "?

Suppose 1: I now execute the begin, A, B, C, and rollback SQL statements in sequence. When A rollback transaction is encountered, it will return to the begin position again, that is to say, the statements A, B, and C do not work.

Suppose 2: I now execute the begin, A, B, C, and commit SQL statements in sequence. When A commit transaction is encountered, it will confirm that A, B, and C are executed.


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.