提交
爲了演示效果,須要打開兩個終端窗口,使用同一個數據庫,操做同一張表
step1:鏈接
select * from goods_cates;
step2:增長數據
begin; insert into goods_cates(name) values('小霸王遊戲機');
select * from goods_cates;
step3:查詢
select * from goods_cates;
step4:提交
commit;
step5:查詢
select * from goods_cates;
回滾
- 爲了演示效果,須要打開兩個終端窗口,使用同一個數據庫,操做同一張表
step1:鏈接
select * from goods_cates;
step2:增長數據
begin; insert into goods_cates(name) values('小霸王遊戲機');
select * from goods_cates;
step3:查詢
select * from goods_cates;
step4:回滾
rollback;
step5:查詢
select * from goods_cates;