构造Hibernate HQL查询

时间:2010-12-09 23:26:17

标签: sql hibernate hql

如何在HQL中编写此SQL查询?

select * 
from ( select a.*, rownum rnum
       from ( select * 
              from TABLE_1 
              WHERE STATUS_FLAG = '105' 
              ORDER BY payment_timestamp desc 
            )a
       where rownum <= 10 )  
where rnum >= 0

1 个答案:

答案 0 :(得分:0)

甲骨文:

选择FROM TABLE_1 a  在哪里a.STATUS_FLAG ='105'  和0到10之间的ROWNUM  通过PAYMENT_TIMESTAMP DESC订购