如图,我想根据第一、三列的对应关系和第二列的ID得到第四列的数据,请问如何实现?
4条回答 默认 最新
- 石岩Maple 2022-08-09 15:51关注
select a.id1,a.id2,a.名称1,b.名称1 名称2 from 表 a LEFT join 表 b on a.id2=b.id1
试试,没测
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用
select a.id1,a.id2,a.名称1,b.名称1 名称2 from 表 a
LEFT join 表 b on a.id2=b.id1
试试,没测