2013年8月13日

再一次见证mssql中in 与exist的区别

摘要: 见下面代码 /*+' select * from '+@strDBName +'.dbo.m_aic where nodeid not in(select nodeid from @tmpAIC) '*/ /*+' select * from '+@strDBName +'.dbo.m_aic as m where not exists (select 1 from @tmpAIC where nodeid = m.nodeid) '*/第一行是用了in第二行用了exists之前看书就听过说由于exist会一遇到命中条件就返回,而 阅读全文

posted @ 2013-08-13 13:24 Orz.. 阅读(242) 评论(0) 推荐(0)

导航