START TRANSACTION; #开始事务
update feedback set title = '新修改TITLE id =2' where id = 2;
select * from feedback where id = 2;
update feedback set title = '新修改TITLE id =4' where id = 4;
select * from feedback where id <5;
#在这里之前 如果有其他进程 去查询数据库 是不变的。只有在进行COOMIT提交后&#xff0c;才会生效&#xff01;&#xff01;&#xff01;
ROLLBACK; #回滚、取消事务
COMMIT; #提交事务
mysql> show table status like &#39;feedback&#39; \G;
*************************** 1. row ***************************
Name: feedback
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 146
Avg_row_length: 112
Data_length: 16384
Max_data_length: 0
Index_length: 0
Data_free: 5429526528
Auto_increment: 147
Create_time: 2013-01-11 10:34:58
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)
ERROR:
No query specified