select a.a,a.b, b.x from a left outer join b on a.id=b.id二表要有字段可以关联,看上面 on a.id=b.id
select id,a,b,c,(select top 1 列 from table2 where table2.id=table1.id)as d from table1