postgreSQL数据库limit分页、排序
发布时间:2020-12-13 17:07:17 所属栏目:百科 来源:网络整理
导读:postgreSQL数据库limit分页、排序 语法: select*frompersonslimitAoffsetB; 解释: A就是你需要多少行; B就是查询的起点位置。 示例: select*frompersonslimit5offset0; 意思是,起点0开始查询,返回5条数据。 select*frompersonslimit5offset5; 意思是,
postgreSQL数据库limit分页、排序 语法: select*frompersonslimitAoffsetB; 解释: A就是你需要多少行; B就是查询的起点位置。 示例: select*frompersonslimit5offset0; 意思是,起点0开始查询,返回5条数据。 select*frompersonslimit5offset5; 意思是,起点5开始查询,返回5条数据。 特殊: select*frompersonslimit5; 这个就类似: select*frompersonslimit5offset0; 也就是,从起点0开始查询,返回5条数据。 按规则排序,同时也要分页: select*frompersons orderbylastname limit5offset0; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |