hive:某张表进行分页

已知表myobject(objectid int)

create table myobject(objectid int) row format delimited fields terminated by ',' stored as textfile;

按照objectid进行分页,其中objectid在表myobject中是唯一的(不重复)数据。

对表myobject进行分页

select t11.* from 
(
select row_number() over (order by t10.objectid) as rnum ,t10.* 
from myobject t10
)t11 
where t11.rnum between 1 and 50;

 

posted @ 2017-10-22 21:48  cctext  阅读(6182)  评论(0编辑  收藏  举报