Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何比较左连接中的多个值?
我有两张桌子
表一 身份证号码 1个 2 乙 3℃ 4个 表b val 完整形式 一个苹果 b 香蕉 猫
我会写,
select a.id, b.fullform from a left join b on a.val=b.val
我假设它将加入 a=a 或 b=b
我想这样比较,
select a.id, b.fullform from a left join b on a.val in (a,b)
不写有可能吗WHERE?
WHERE
你很接近:
select a.id, b.fullform from a left join b on a.val = b.val where a.val in (a,b)