select A.*,coalesce(B.bEnable,0) as bEnable from data_dictionary A left join role_auth B on A.sCode=B.sAuthCode and B.sRoleCode=‘001’ where A.iType=1
mysql left join 空值改默认值 coalesce
最新推荐文章于 2022-11-06 09:41:13 发布
select A.*,coalesce(B.bEnable,0) as bEnable from data_dictionary A left join role_auth B on A.sCode=B.sAuthCode and B.sRoleCode=‘001’ where A.iType=1