dolt
dolt copied to clipboard
order of CTEs defined matters
In MySQL, CTEs that reference other CTEs can only see the ones to the left
mysql> with c as (select * from b), b as (select * from a), a as (select 1) select * from c;
ERROR: 1146: Table 'test_db.b' doesn't exist
dolt has no such restriction
dolt > with c as (select * from b), b as (select * from a), a as (select 1) select * from c;
+---+
| 1 |
+---+
| 1 |
+---+