是left out join(左外连接)
不是left jion
从你的表达式来看应该是用 right out join
这些是SQL7.0的用法,2000的话应该可以是table1.column=table2.*.

解决方案 »

  1.   


    Select show_id1,B.b_name,show_id2,C.b_name from t_a A
    Left Join t_b B On A.show_id1=B.b_id
    Left Join t_b C On A.show_id2=C.b_id
      

  2.   

    a表中有
     show_id1  show_id2
      1           4
      3           3
      4           2
                  2               
    ...
    b表中
     b_id      b_name
     1          aaa
     2          bbb
     3          ccc
     4          ddd
    ...
     10         mmm  
    ...
    我想查出结果是
    aaa      ddd
    ccc      ccc
    ddd      bbb
             bbb
      

  3.   

    select xx=(select b.b_name from 表2 b where a.show_id1=b.b_id),cc=(select c.b_name from 表2 c where a.show_id2=c.b_id) from 表1 a
      

  4.   

    --测试数据
    create table 表1 (show_id1  varchar(10),
    show_id2 varchar(10))go insert into 表1 (show_id1,show_id2) select '1','4'
    union all select  '3','3'
    union all select  '4','2'
    union all select  '','2'
    create table 表2 (b_id  varchar(10),
    b_name varchar(10))goinsert into 表2 (b_id,b_name) select '1','aaa'
    union all select  '2','bbb'
    union all select  '3','ccc'
    union all select  '4','ddd'go
    select xx=(select b.b_name from 表2 b where a.show_id1=b.b_id),cc=(select c.b_name from 表2 c where a.show_id2=c.b_id) from 表1 a