`
liuyifan.com
  • 浏览: 4436 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

sql 、 hibernate分页

阅读更多
拿来主义

sql:
引用

1.Oracle: 
select * from ( select row_.*, rownum rownum_ from ( query_SQL ); row_ where 

rownum =< max); where rownum_ >= min 

2.SQL Server: 
select top @pagesize * from tablename where id not in 
(select top @pagesize*(@page-1); id 
from tablename order by id); order by id 

3.MySQL 
select * from tablename limit position, counter 

4.DB2 
select * from (select *,rownumber(); as ROW_NEXT from tablename); where 

ROW_NEXT between min and max 




hibernate:

http://forum.hibernate.org.cn/viewtopic.php?t=14657&postdays=0&postorder=asc&start=0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics