2010-12-09 99 views
0

如何在HQL中編寫此SQL查詢?構建Hibernate HQL查詢

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 
+0

爲哪些數據庫? – 2010-12-10 02:09:04

回答

0

甲骨文:

選擇一個FROM TABLE_1一個 WHERE a.STATUS_FLAG = '105' AND ROWNUM 0和10之間 ORDER BY PAYMENT_TIMESTAMP DESC