select (select name from a ,b where a.id=b.f1) as f1,
(select name from a ,b where a.id=b.f2) as f2,
(select name from a ,b where a.id=b.f3) as f3
(select name from a ,b where a.id=b.f2) as f2,
(select name from a ,b where a.id=b.f3) as f3
调试欢乐多
(select name from a ,b where a.id=b.f2) as f2,
(select name from a ,b where a.id=b.f3) as f3
from a,b
where a.id=b.f1 or a.id=b.f2 or a.id=b.f3