码迷,mamicode.com
首页 > 数据库 > 详细

PostgreSql 分页limit

时间:2017-03-31 19:53:28      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:http   是你   set   ref   from   需要   查询   起点   postgre   

摘录自:http://jingyan.baidu.com/article/a17d528538119b8098c8f2ca.html

语法:

select * from persons limit  A  offset  B;

解释:

A就是你需要多少行;

B就是查询的起点位置。

A B是bigint类型的值

示例:

select * from persons limit 5 offset 0 ;

意思是,起点0开始查询,返回5条数据。

PostgreSql 分页limit

标签:http   是你   set   ref   from   需要   查询   起点   postgre   

原文地址:http://www.cnblogs.com/haimishasha/p/6653058.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!