18 事务
原子性
隔离性
一致性
持久性
事务的状态
- 活动:事务正在执行
- 部分提交:事务执行了最后的操作,修改还在内存中
- 提交:事务的修改刷新到磁盘中
- 失败:执行事务时,人为终止或发生了错误
- 中止:事务发生错误后,对事务进行回滚
语法
begin;
# 执行操作
commit;# rollback
start transaction [read only, read write , with consistent snapshot];
# 执行操作
rollback;
微信扫一扫
begin;
# 执行操作
commit;# rollback
start transaction [read only, read write , with consistent snapshot];
# 执行操作
rollback;
相关推荐