既然是主从表,那就应该有个字段关联。比如:序号(no)
select a.*,b.*,c.* from a a,b b ,c c
  where a.no = b.no and a.no = c.no;

解决方案 »

  1.   

    select a.*,b.*,c.* from a inner join b on a.no=b.no
    inner join c on a.no=c.no
      

  2.   

    可以吧,就象LGQDUCKY(飘)说的,先问你是要这样的结果吗?
    select a.*,b.*,c.* from a a,b b ,c c
      where a.主键 = b.引用a的主键 and a.主键 = c.引用a的主键;
      

  3.   

    主表a的一条记录,可对应子表b,c中的多条记录,要一行表示。
    如:
    a表 
    no name     id
    1  steven   1111
    2  tom      2222b表 
    b_no  a_no re
    1     1    aaaaa
    2     1    bbbbbc表
    c_no  a_no thing
    1     1    cccccc
    2     1    dddddd要一条语句,实现在结果如下:1 steven 111 aaaaa bbbbb ccccc ddddd
      

  4.   

    一行多条记录?有多少条?条数固定的话可以,用case或者if
      

  5.   

    你这是个交叉表,可以实现的.
    select a.no,a.name,a.id,
    decode(b.re,'aaaaa',b.re) aaaaa,
    decode(b.re,'bbbbb',b.re) bbbbb,
    decode(c.thing,'ccccc',b.thing) ccccc,
    decode(c.thing,'ddddd',b.thing) ddddd 
    from a,b,c 
    where a.no=b.a_no and a.no=c.a_no
      

  6.   

    aaaaa、bbbbbb、cccccc........内容是不知道的哦,这样可行吗?
      

  7.   

    select a.no,a.name,a.id,
    decode(b.a_no,a.no,b.re) aaaaa,
    decode(c.a_no,a.no,c.thing) ddddd 
    from a,b,c 
    where a.no=b.a_no and a.no=c.a_no
      

  8.   

    基本方法如下,能不能实现看数据:
    select no,name,
    max( decode( a_no, no, re, null ) ) no_10,
    max( decode( a_no, no, re, null ) ) no_20,
    .....
    max( decode( a_no, no, thing, null ) ) no_30,
    max( decode( a_no, no, thing, null ) ) no_40,
    ....
    from a,b,c
    where a.no=b.a_no(+) and a.no=c.a_no(+)
    group by no,name