MySQL Full Join等价改写
MySQL Full Join等价改写
MySQL不支持Full Join,可以这样改写:
- snippet.bash
select * from t1 full join t2 on t1.id = t2.id;
等价改写 ⇒
- snippet.bash
select * from t1 left join t2 on t1.id = t2.id union all select * from t1 right join t2 on t1.id = t2.id where t1.id is null;
打赏作者以资鼓励: