数据写错了吧?!select aa,a1.name as bb,a2.name as cc,a3.name as dd
from b,a a1,a a2 a a3
where b.bb=a1.id
and b.cc=a2.id
and b.dd=a3.idor???:select aa,left(a1.name,4) as bb,left(a2.name,4) as cc,left(a3.name,4) as dd
from b,a a1,a a2 a a3
where b.bb=a1.id
and b.cc=a2.id
and b.dd=a3.id
from b,a a1,a a2 a a3
where b.bb=a1.id
and b.cc=a2.id
and b.dd=a3.idor???:select aa,left(a1.name,4) as bb,left(a2.name,4) as cc,left(a3.name,4) as dd
from b,a a1,a a2 a a3
where b.bb=a1.id
and b.cc=a2.id
and b.dd=a3.id
,(select left(name,4) from a where bb = b.id)
,(select left(name,4) from a where cc = b.id)
,(select left(name,4) from a where dd = b.id)
from b
select aa,
left((select name from table1 where id=(select bb from table2 where aa=a.aa)),4),
left((select name from table1 where id=(select cc from table2 where aa=a.aa)),4),
left((select name from table1 where id=(select dd from table2 where aa=a.aa)),4) from table2 a
(select left(name,4) from table1 where id=(select bb from table2 where aa=a.aa)),
(select left(name,4) from table1 where id=(select cc from table2 where aa=a.aa)),
(select left(name,4) from table1 where id=(select dd from table2 where aa=a.aa)) from table2 a
,left((select name from a where bb=b.id),4)
,left((select name from a where cc = b.id),4)
,left((select name from a where dd = b.id),4)
from b