All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
SQLServer2005-在执行批处理时出现错误。错误消息为-,目录名无效_mssql学习_编程技术
技巧应用:ASP.Net中的MD5加密_.net资料_编程技术
轻松掌握Ajax.net系列教程十五:使用AutoCompleteExtender_[Asp.Net教程]
XML入门教程-使用CSS显示XML_[XML教程]
如何将索引碎片数量降至最低_[SQL Server教程]
用ASP.NET,2.0在Oracle中存取图片(文件)的操作_.net资料_编程技术
系统安全之Apache服务器实现用户验证_[PHP教程]
XHTML 1.0:标记新的开端_[Html教程]
ASP.NET从零起步设计网站全过程(7)_[Asp.Net教程]
C#教程:C#数据类型之装箱和拆箱
Reading number is top 10 pictures
小学生作文又现神作,你不得不佩服
海底兵马俑
The real super beauty5
XuRe xuan cool and refreshing photoes1
Beauty is thus produced
More attractive than sora aoi1
XuYing poker perspective garment debut
Fury xp desktop theme
Female model behind the bitterness, often being overcharged4
抗日又出雷剧情
Download software ranking
Tram sex maniac 2 (H) rar bag3
Tram sex maniac 2 (H) rar bag15
Ashlynn Video2
实战黑客不求人
SQL2000 For 4IN1
Red cliff
传奇私服架设教程-chm
Unix video tutorial20
Tram sex maniac 2 (H) rar bag12
asp.netWeb服务器高级编程
归海一刀 published in(发表于) 2014/2/1 0:10:11 Edit(编辑)
Sql,server,2005带来的分页便利_[SQL,Server教程]

Sql,server,2005带来的分页便利_[SQL,Server教程]

Sql server 2005带来的分页便利_[SQL Server教程]

select threadid from
(
select threadid, ROW_NUMBER() OVER (order by stickydate) as Pos from cs_threads
) as T
where T.Pos > 100000 and T.Pos < 100030


===========================================


如果里面的这个表cs_threads数据量超大,比如,几亿条记录,那这个方法应该是有问题的


因为,select threadid from
(
select threadid, ROW_NUMBER() OVER (order by stickydate) as Pos from cs_threads
) as T
where T.Pos > 100000 and T.Pos < 100030
这个语句是把select threadid, ROW_NUMBER() OVER (order by stickydate) as Pos from cs_threads它全部取出来,然后在SQL的外面进行分页的,没在SQL2005上测试过,因为原先在ORACLE上这样的写法是不好的,ORACLE中这样写比较好:select threadid from
(
select threadid, ROW_NUMBER() OVER (order by stickydate) as Pos from cs_threads a where a.pos<100030
) as T
where T.Pos > 100000


出处:blog.joycode.com/dotey/archive/2006/01/16/70493.aspx







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.