文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>写分页用的SQL(备忘)

写分页用的SQL(备忘)

时间:2011-05-13  来源:ゞ追忆o0ゞ

这里使用了SQL2005以上版本的内置函数 row_number()方法;

over里是根据什么进么排序;

rownum为子表的别名;

 where t.rownum >=11 and t.rownum <=20  以出十条记录;

 

select * from 
(
    select Id,Name,row_number() over(order by id)as rownum
    from category
    where
    id > 30
)t
where t.rownum >=11 and t.rownum <=20
相关阅读 更多 +
排行榜 更多 +
粘人小公举

粘人小公举

休闲益智 下载
奥特曼系列ol腾讯qq版

奥特曼系列ol腾讯qq版

角色扮演 下载
同.桌双人游戏

同.桌双人游戏

休闲益智 下载