比如有2个表:
table A
A_id A_text      B_id 
1 a1 1
2 a2 null
3 a3 null
4 a4 2table B
B_id    B_text
1 'b1'
2 'b2'A的B_id字段是对应B表的B_id的,但是可能为空,需要得到的结果是将A中每行对应的B_text查询出来,有就是B_text的实际值,如果为空就写'无'或者其他之类的.也就是下面的结果
A_id   A_text     B_id    b_text
1 a1 1 'b1'
2 a2 null '无'
3 a3 null '无'
4 a4 2 'b2'Sql Server的数据库