select ISNULL(a.字段1,b.字段1),字段2 from a表 a left join b表 b on a.字段3=b.字段3
试试
select a.column1, case when a.column2 is null then b.column2 when a.column2 is not null then a.column2 end from a join b on a.column1 = b.column1