摘要:
1. MVCC 快照的机制MVCC 为每个事务提供了一个一致性视图(Consistent View),这个视图是事务开始时数据库的一个快照。事务 A 的快照是在事务 A 开始时创建的,它只会包含事务 A 开始时已经提交的数据。事务 B 的插入操作是在事务 A 开始之后发生的,因此这些新数据不会出现在 阅读全文
摘要:
mysql8.0改5.7细节 先展示演示用表: 一、不接受子查询的 from 后所接的子查询里有主查询字段 这是可以执行的,因为主查询字段a.id没跟在from后 select (select b.val from tab_b b where b.id=a.id) from tab_a a结果:ab 阅读全文
摘要:
## 找出所有后代数据 with getTree as ( select parent_id, id from a where a.id = #{id}; UNION all select a.parent_id, a.id from a inner join getTree on a.parent 阅读全文