不要count(*)
select a.id,b.name from t_gljbqk a,t_csygk b,t_csylb c where a.id=b.id and a.id=c.id order by a.id asc

解决方案 »

  1.   

    select  a.id,a.name,
    (select count(*) from t_csygk b where b.id=a.id) ,
    (select count(*) from t_csylb c where c.id=a.id)  
    from t_gljbqk  a order  by  a.id  asc
      

  2.   

    to bzszp(www.bzszp.533.net):那行数怎么取出来呢?
      

  3.   

    ???已经取出来了
     
    select   a.id,a.name,  
    (select count(*) from t_csygk b where b.id=a.id) 行数b,  
    (select count(*) from t_csylb c where c.id=a.id) 行数c     
    from t_gljbqk a order  by  a.id asc;
      

  4.   

    select * from 
    t_gljbqk a,
    (select id,count(*) from t_csygk group by id) b,
    (select id,count(*) from t_csylb group by id) c
    where b.id(+)=a.id or c.id(+)=a.id
      

  5.   

    to hepctyg(tang):
    b.id(+)=a.id 什么意思?