摘要:SQL 语句优化: 1、union 为Bak的 分开写Where语句,Where后再union 2、union 换为union all 3、Select * 换成具体字段 3、有参数的,用参数列表,AnsiString对应的char,varchar,string对应的nchar,nvarcha...
        阅读全文
        | 06 2013 档案
摘要:SQL 语句优化: 1、union 为Bak的 分开写Where语句,Where后再union 2、union 换为union all 3、Select * 换成具体字段 3、有参数的,用参数列表,AnsiString对应的char,varchar,string对应的nchar,nvarcha...
        阅读全文
 
摘要:方法:1、not In2、Left join3、select * from tmptable1where (select count(1) from tmptable2 where tmptable1.agentid = tmptable2.agentid and tmptable1.phone = tmptable2.phone)=0
        阅读全文
 
 |