SQL优化[43]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 fly_miss 的 blog

    else

    set @strsql = "select count(*) as total from [" + @tblname + "]"

end 

--以上代码的意思是如果@docount传递过来的不是0,就执行总数统计。以下的所有代码都是@docount0的情况

else

begin

 

if @ordertype != 0

begin

    set @strtmp = "<(select min"

set @strorder = " order by [" + @fldname +"] desc"

--如果@ordertype不是0,就执行降序,这句很重要!

本文关键:SQL优化
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top