HQL怎麼使用union all和order by

select   *   from   (select companyInfo.subject,companyInfo.guId from CompanyInfo  companyInfo  where companyInfo.type='企業動態'  order by companyInfo.startDate desc  ) a  union all  select   *   from   (select infos.subject,infos.guId from Infos  infos,Category  category  where category.categoryName='園區動態' and infos.categoryId=category.guId order by infos.startDate desc ) b  

這段sql怎麼改成hql啊 謝謝

發佈了25 篇原創文章 · 獲贊 0 · 訪問量 3574
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章