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:
- BEGIN TRANSACTION;
Or
In MySQL or PostgreSQL, enter:
- START TRANSACTION;
Commit committing transaction
Input:
- COMMIT;
Rolling back the transaction
Input:
- 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.