
SQL Server
chentaihan
做一个牛B的程序员
展开
-
分页存储过程
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoCREATE PROCEDURE [dbo].[GetTreeDetails] @start int ,--数据页码 @limit int ,--每页显示数据条数 @totalCount int OUT ,--数据总条数原创 2010-03-28 17:58:00 · 476 阅读 · 0 评论 -
SQL 分页支持查询
SQL 分页支持查询 ROW_NUMBER() OVER (ORDER BY ReportID) AS RowNo 分页支持查询 SELECT * FROM (select *,ROW_NUMBER() Over(order by [id]) as row_index from [table] ) as [newtable] where row_index between [star原创 2010-04-02 10:54:00 · 577 阅读 · 0 评论 -
SQL ROW_NUMBER() VS TOP
ROW_NUMBER() 的SQL语句: select * from ( select ID , ArchivesTypeID,SegmentColumnName,SegmentDisplayText,SegmentOrderID, SegmentSeparator,ROW_NUMBER() over(order by ID desc ) as RowNum from MytestTable ) table1 where RowNum between 1700000 and 17原创 2010-10-28 11:08:00 · 1257 阅读 · 0 评论