Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the transaction types of mysql

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

In this article, the editor introduces in detail "what are the transaction types of mysql", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what are the transaction types of mysql" can help you solve your doubts.

1. Mysql transactions are divided into explicit transactions and implicit transactions. The default transaction is an implicit transaction, and the variable autocommit is automatically opened, committed, and rolled back during operation.

2. Explicit transactions are controlled by us to open, commit, rollback and other operations.

Example

Take a look at the current autocommit status. The default is on status mysql > show variables like 'autocommit'. +-+-+ | Variable_name | Value | +-+-+ | autocommit | ON | +-+-+ 1 row in set (0.01sec)-insert a piece of data mysql > insert into ajisun values Query OK, 1 row affected (0.00 sec) mysql > rollback;-the execution of rollback also has no effect, but you can still query the inserted data (no need for us to control commit manually) mysql > select * from ajisun +-+-+ | id | name | +-+-+ | 1 | Aggie | +-+-+ 1 row in set (0.00 sec). This article "what are the transaction types of mysql" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report