Sql server 2005带来的分页便利
来源:互联网 发布:文件分类软件 编辑:程序博客网 时间:2024/05/17 08:20
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
- Sql server 2005带来的分页便利
- Sql server 2005带来的分页便利
- Sql server 2005带来的分页便利
- Sql server 2005带来的分页便利
- Sql server 2005带来的分页便利
- Sql server 2005带来的分页便利
- Sql2005带来的分页便利
- Sql2005带来的分页便利
- 惊喜:Sql2005带来的分页便利
- Sql 2005 带来的分页新方法
- SQL Server 2005下的分页SQL
- SQL Server 2005下的分页SQL
- SQL Server 2005下的分页SQL
- SQL Server 2005 分页
- 分页 - sql server 2005
- SQL Server 2005 分页
- Sql Server 2005 分页
- 令人兴奋的sql server 2005 分页功能!!
- 高效分页存储过程
- DotNet(C#)学习-你学到什么程度!
- DataFormatString属性语法介绍及解决DataFormatString无效的问题
- SQL语句优化技术分析
- 南京永远是江苏最好的城市(一个南大学生的感言)
- Sql server 2005带来的分页便利
- 结构型模式
- 仿淘宝的tips效果
- sql列转行
- 转载:ISA板卡读取数据的驱动程序源码(1)
- .net中使用反射的简单例子
- C#调用存储过程简单完整例子
- 初学者SQL语句介绍
- C#中SQL备份与恢复