select * from table1,table2, table3,table 4 where ... 试试

解决方案 »

  1.   

    我觉得,可能是索引问题,你可以看看是不是建立了!
    还有,你每个表的数据多少?
    select * from table1,table2,
         (select table3.id,table4.salary from table3,table 4 where table3.id=table4.id) i
    where .........
    的方法不一定比
    select * from table1,table2, table3,table 4 where 
    的速度快!这要看具体的情况!
      

  2.   

    上面是个全联接

    table1 有 10条记录
    table2 有 10条记录
    table3 有 10条记录
    table4 有 10条记录
    则最终的记录数为10*10*10*10条
    请各位指教
      

  3.   

    select * from table1,table2,
         (select table3.id,table4.salary from table3,table 4 where table3.id=table4.id) i
    where .........是什么意思啊?看不懂