db2分页的sql语句
select temp.* from(
select ROW_NUMBER()OVER(order by logtime desc) ni,logtime,userid,machineip,logtype,logcontent from sys_log order by logtime desc
) temp where temp.ni>=1 and temp.ni<=20 order by temp.logtime desc
;
select temp.* from(
select ROW_NUMBER()OVER(order by logtime desc) ni,logtime,userid,machineip,logtype,logcontent from sys_log order by logtime desc
) temp where temp.ni>=1 and temp.ni<=20 order by temp.logtime desc
;