问个查询效率问题,我两张表数据都是60万,我sql语句是:select * from test08 a where a.nbr not in(select nbr from disct@towe where ...not in(select nbr from disct@towe where disct=12)如果nbr得出來的結果很多,查詢肯定會很慢的。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from test08 a where exists(select * from disct@towe where disct=12 and a.nbr=nbr) 条件搞反了:select * from test08 a where not exists(select * from disct@towe where disct=12 and a.nbr=nbr) select * from test08 a where not exists(select 1 from disct@towe where disct=12 and a.nbr=nbr) 查询 请问如何让SOL Server定时执行某个存储过程(不用job) MSSQL2008 数据库展开报错:值不能为空? 执行超时的存储过程 怎么通过时间来修改表里记录? SQL Server 2008 视图高手请进 在查询分析器中执行任何update语句,总是报找不到存储过程 'MASTER..XP_SENDEMAIL'。 数据库同步问题 SQL2000查詢問題。。。 各位大虾,ORACLE的存储过程的问题。帮帮忙 请问如何筛选出两个字段相同的表里的内容不同的记录? 在SQL查询分析器中如何知道sql语句所用时间
where exists(select * from disct@towe where disct=12 and a.nbr=nbr)
select * from test08 a
where not exists(select * from disct@towe where disct=12 and a.nbr=nbr)
where not exists(select 1 from disct@towe where disct=12 and a.nbr=nbr)