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啊 谢谢
本文介绍了一段将SQL查询转换为HQL查询的需求场景,涉及从两个不同表中选择记录并按日期降序排列的问题。
2299





