如果 你的SQL中用LEFT JOIN+UNION遇见了没有值但是多了一行NULL的数据
规范解决方案如下: 修改SQL用多表方式查询
select *.id,*.name from a,b,c UNION select *.id,*.name from d,f,c
最简单但是不推荐的方法.
select *.id,*.name from a LEFT JOIN b on xx =xx LEFT JOIN c on xx =xx where *.id is not null UNION select *.id,*.name from d LEFT JOIN e on xx =xx LEFT JOIN f on xx =xx where *.id is not null
不写全了。好累的。。
如果 没懂可以 发送邮箱:
ruoyushen: ruoyushen@outlook.com
周一 ------周五 正常阅读 大家懂得 。哈哈