有谁可以帮我把这条sql语句改改?
有谁可以帮我把这条sql语句改改?
select * from table1 where id in(select fid form table2 where id in(select info_id from table3 )) and id in(select * from table4)
其中用了4个in,效率比较低,table2是放id,fid的字段.其实前面一半可以写成select * from table1,table2,table3 where table1.id=table2.id and table2.fid=table3.id不过怎么接上后面的and id in(select * from table4)
?