select a.name,c.name,d.name
 from a,a c,a d,b
 where a.id=b.id and c.id=b.id and d.id=b.id

解决方案 »

  1.   

    select * from a inner join 
    (select id1 as id from b
    union 
    select id2 as id from b
    union 
    select id3 as id from b) AS TT on tt.id=a.id
      

  2.   

    写错了条件:
    select a.name,c.name,d.name
     from a,a c,a d,b
     where a.id=b.id1 and c.id=b.id2 and d.id=b.id3
      

  3.   

    select  id1=(select  name  from  a  where  id=b.id1),
    id2=(select  name  from  a  where  id=b.id2),
    id3=(select  name  from  a  where  id=b.id3)  
    from  b