摘要: SQL Server先从想要的数据处理加上Row_number()来为数据的row加上一个RowNum作为有多少条数据,然后再用BETWEEN来分隔 with t1 as (select * , Row_number() OVER (ORDER BY userId DESC) AS RowNum from users) SELECT *FROM t1 WHERE RowNum BETWEEN ((page-1)*rows+1) AND (page*rows)Oralce数据库 从数据库表中第M条记录开始检索N条记录 SELECT * FROM (SELECT ROWNUM r... 阅读全文
posted @ 2012-03-12 12:49 3H 阅读(466) 评论(0) 推荐(0) 编辑