首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

这两条话语的查询效率的比较,哪条效率高

2012-09-08 
这两条语句的查询效率的比较,哪条效率高select * from table1 where flag1 and username in (select name

这两条语句的查询效率的比较,哪条效率高
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……

热点排行