试试这个,没测试
select a.*,(select (select (select (select * from f where eid=e.ied) from e where did=d.did) from d where cid=c.cid) from c where bid=b.bid) from b where aid=a.aid) from a;

解决方案 »

  1.   

    TO:zhenyukeji(何处是我家) 
       我的逻辑很简单,b和d是中间表,各只有两个ID字段,起连接作用,而且
    如果不用外连接的话,查询速度很快select * 
    from a,b,c,d,e,f
    where  a.aID=b.aID  and
           b.bID=c.bID  and
           c.cID=d.cID  and  
           d.dID=e.dID  and
           e.eID=f.eID    
    其中各表记录都是5000条TO  beckhambobo(beckham):
      我试过了,SQL语法通不过TO  yangwl(杨威利) 
     除了b和d表,其它各表都有主键索引
      

  2.   

    对,应该给b,d对id键建立索引