oracle 分页语句

SELECT *
  FROM (SELECT tt.*, ROWNUM AS rowno

          FROM (  
                SELECT t.vin_mt ,dbxx
                    FROM {PdaCommonAppService.PREFIX}v_pj_dygx t
                    WHERE vin_jj like '%{input.vin_jj}%' and
                    dbxx BETWEEN TO_DATE ('{input.StartTime:yyyyMMdd}', 'yyyyMMdd') AND TO_DATE('{input.EndTime:yyyyMMdd}', 'yyyyMMdd')
                    ORDER BY dbxx DESC) tt

         WHERE ROWNUM <= {input.SkipCount + input.Length}) table_alias

 WHERE table_alias.rowno > {input.SkipCount}
{PdaCommonAppService.PREFIX}  前缀
input.SkipCount   跳过的数量
input.Length  每页条数



posted @ 2021-04-08 14:10  も不秃不秃  阅读(131)  评论(0编辑  收藏  举报