Introduction to the implicit start of DB2 transactions

Source: Internet
Author: User

This article mainly describes the implicit start of DB2 transactions. We all know that transactions in Oracle and DB2 databases always start implicitly, and these DBMS do not have certain statements used to start transactions. In Microsoft Access, Microsoft SQL Server, MySQL, and PostgreSQL, you can use the BEGIN statement to start transactions explicitly.

SQL: 1999 introduces the START TRANSACTION statement. Because this occurs a long time after the DBMS starts a TRANSACTION using BEGIN, the syntax for extending BEGIN varies with DBMS. MySQL and PostgreSQL support start transaction as the synonym for BEGIN ).

Begin explicitly starts a transaction

In Microsoft Access or Microsoft SQL Server, enter:

 
 
  1. BEGIN TRANSACTION; 

Or

In MySQL or PostgreSQL, enter:

 
 
  1. START TRANSACTION; 

Commit committing transaction

Input:

 
 
  1. COMMIT; 

Rolling back the transaction

Input:

 
 
  1. ROLLBACK;  

The above content is an introduction to the implicit start of DB2 transactions. I hope you will gain some benefits.

The above content is the description of the implicit start of DB2 transactions, and we hope to help you in this regard.

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.