标签:连接 数据库 update nts ble val 其他 -- innodb
show create table students;
alter table ‘表名‘ engine=innodb;
开启begin;
提交commit;
回滚rollback;
begin与commit之间,所有对库修改的语句都临时在内存中保存。只要没执行commit。可以随时通过rollback回滚。
执行commit后,修改的内容固化到硬盘中。
步骤1:打开两个终端,连接mysql,使用同一个数据库,操作同一张表 终端1: select * from students; ------------------------ 终端2: begin; insert into students(sname) values(‘张飞‘);
步骤2 终端1: select * from students;
步骤3 终端2: commit; ------------------------ 终端1: select * from students;
步骤1:打开两个终端,连接mysql,使用同一个数据库,操作同一张表 终端1: select * from students; ------------------------ 终端2: begin; insert into students(sname) values(‘张飞‘); 步骤2 终端1: select * from students; 步骤3 终端2: rollback; ------------------------ 终端1: select * from students;
标签:连接 数据库 update nts ble val 其他 -- innodb
原文地址:https://www.cnblogs.com/LiuYanYGZ/p/12237319.html