informix 分页查询实现

1.informix 数据库实现方案
informix 数据库提供了非常便捷高效sql,select skip M first N from table name where 1=1 order by col;
说明:M为(第几页-1)*每页记录数
           N为每页记录数
2.hiberate 实现方案
通过设置Criteria 对象的firstResult和maxResults属性,每次都查询(firstResult+maxResults)条记录,然后对查询结果集 resultSet跳过firstResult条记录,最后返查询结果集。
   日后上源码分析。。。。。

猜你喜欢

转载自chenja.iteye.com/blog/2309876