In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
A START TRANSACTION or BEGIN statement starts a transaction
The COMMIT statement commits the transaction so that the changes to the data take effect permanently
The ROLLBACK statement rolls back the transaction and cancels changes to the data
The SET autocommit statement disables or enables the default transaction auto-commit feature for the current session
-- example
Mysql > START TRANSACTION
Query OK, 0 rows affected (0.00 sec)
Mysql > SELECT @ A:=SUM (deptno) FROM test
+-+
| | @ A:=SUM (deptno) |
+-+
| | 150 |
+-+
1 row in set (0.00 sec)
Mysql > UPDATE test SET deptno=@A WHERE deptno=10
Query OK, 1 row affected (0.05sec)
Rows matched: 1 Changed: 1 Warnings: 0
Mysql > commit
Query OK, 0 rows affected (0.01 sec)
-- turn off the auto-commit function of the current session transaction
Mysql > SET autocommit=0
Query OK, 0 rows affected (0.00 sec)
Mysql > show variables like'% commit%'
+-+ +
| | Variable_name | Value |
+-+ +
| | autocommit | OFF |
| | innodb_commit_concurrency | 0 | |
| | innodb_flush_log_at_trx_commit | 1 | |
+-+ +
3 rows in set (0.00 sec)
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.