SQL数据库连表查询如何将左表中的某一个字段覆盖右表?
更新还是查询?
查询的话。比如根据条件覆盖
select case when A=B then lefttable.field else righttable.field from lefttable a end as newfield
left join righttable b on lefttable .id = righttable .id