oracle分页sql查询语句注解版

@Select({"<script>",
            "select * from ( SELECT A.*, ROWNUM RN **FROM** ( select *  from  kgusers)A",
            "<where>",
            "<if test='pageSize !=null and pageIndex !=null'>",
            "ROWNUM &lt;= #{pageSize}*#{pageIndex}",
            "</if>",
            "</where> )",
            "<where>",
            "<if test='pageIndex >1'>",
            "RN >=(#{pageIndex}-1)*#{pageSize}",
            "</if>",
            "</where>"
            ,"</script>"})

#加粗from后为查询业务表sql语句


猜你喜欢

转载自blog.csdn.net/phillip629/article/details/90738064