我有三张桌子和结构如下:
id name education
1 test1 a
2 test2 b
3 test3 c id name abcid
1 takr 1
2 test21 1
3 testlll 2 id name abcid
1 takr 2
2 test21 2
3 testlll 3我想要所有基于abc表id的数据
下面是查询
SELECT d.ID,l.VALUE_ID as RI_ID,l.UF_CRM_1486370412 as RI_AMT, f.VALUE_ID as Finance_Id , f.UF_CRM_1595053941 as FI_AMT
FROM b_uts_crm_lead as l
JOIN b_crm_deal as d
ON d.ID = l.UF_CRM_1600342528
JOIN b_uts_crm_financeaddition as f
ON d.ID = f.UF_CRM_1600350766发布于 2020-09-18 13:34:05
我猜你想要left join
select . . . -- the columns you want
from abc left join
xyz
on xyz.abcid = abc.id left join
pqr
on pqr.abcid = abc.id;https://stackoverflow.com/questions/63956756
复制相似问题