日期:2014-05-17  浏览次数:20768 次

这两条语句的查询效率的比较,哪条效率高
select * from table1 where flag=1 and username in (select name from table2 where forbid=no and joinstate in(0,1) and group=12)

select * from table1,table2 where flag=1 and table1.username=table2.name and forbid='no' and joinstate in(0,1) and group=12

------解决方案--------------------
探讨
select * from table1 where flag=1 and username in (select name from table2 where forbid=no and joinstate in(0,1) and group=12)

select * from table1,table2 where flag=1 and table1.username=table2.na……