效率不是太高
select (select 表A.field_2 from 表A where 表A.field_1=表B.field_1),(select 表A.field_2 from 表A where 表A.field_1=表B.field_2),表B.field_3 from 表B

解决方案 »

  1.   

    A:id,name
    B:id1,id2,priceselect (select A.name from A,B where id=id1) from_city,(select A.name from A,B where id=id2) to_city,price from B;
      

  2.   

    select a1.name,a2.name,b.price from a a1,a a2,b where a1.id=b.id1 and a2.id=b.id2;
      

  3.   

    select (select name from 表A where id=表B.id),(select name from 表A where id=表B.id),col_name3 from 表B
      

  4.   

    TABLE A (A1,A2)
    TABLE B (B1,B2,B3)SELECT A.A2,AA.A2,B.B3
     FROM A,B,A AA
     WHERE B.B1=A.A1
       AND B.B2=AA.A1
    ORDER BY B.B1,B.B2也就是多用了一个别名而已
    ok
      

  5.   

    select a1.name,a2.name,b.id from a a1,a a2,b where b.col1=a1.id and b.col2=a2.id