这两个select 语句如何变成一条语句?
select name from tableA where id=5;
select addres from tableB where stno=6;
其中表tableA中的id和表tableB中的stno是唯一的。
我用
select tableA.name,addres.tableB ,tel.tableB from tableA,tableB
where (tableA.id=5) and (tableB.stno=6)
时只有两个表都符合要求时才返回(name,addres,tel)
我想当“select addres from tableB where stno=6;”的结果为空时
也返回(name,addres,tel)怎么做?(其中addres,tel为NULL)