标签:where sys creat derby span 最优 str lis first
//Oracle最优化分页查询语句:
select * from( select row_., rownum rownum_ from( select from TEST0816.T_USER user0_ orderby user0_.USER_ID ) row_ where rownum <= ? ) where rownum_ > ?
//eg:
public void test6()
{
//设置开始行号——(页码-1)*每页行数
//使用方法链查询
List<User> lu =se.createQuery("from User order by userID")
.setMaxResults(5)
.setFirstResult(5)
.list();
//遍历
for(User u:lu)
{
System.out.println(u);
}
}
标签:where sys creat derby span 最优 str lis first
原文地址:http://www.cnblogs.com/HRZJ/p/6064311.html