文件名称:SQL2005 高效分页sql语句
文件大小:16KB
文件格式:PDF
更新时间:2024-02-09 15:56:55
SQL 分页
1、 代码如下: select top 10 * from ( select top (@Page * 10) ROW_NUMBER() OVER (order by id) as RowNum, id, username from Guest where username = ‘user’ ) as T where RowNum > ((@Page – 1) * 10) 2、 代码如下: select * from ( select ROW_NUMBER() OVER(order by id) as RowNum,id,username from Guest where usernam