db2 和oracle下的分页操作

select * from
(
select  t.CLICK_ID,t.MENUID,t.CREAT_TIME,rownumber()
over(order by t.CREAT_TIME desc) as rn
from   PAPP.T_SYS_WEB_CLICK t
) as al where al.rn<=10 and al.rn>=0

 

oracle 中是用rownum r 而不是rownumber()
over(order by t.CREAT_TIME desc) as rn

你可能感兴趣的:(oracle,Web,db2)