现在的位置: 首页 > 综合 > 正文

hibernate hql不支持的查询

2013年10月03日 ⁄ 综合 ⁄ 共 314字 ⁄ 字号 评论关闭

不支持的查询

union

from后加子查询

select 后加子查询

 


 

left join用法

select c.categoryId, c.categoryName, count(distinct p.productId) from  ProductCategory c, Product p left join p.brand as b
 where p.productCategory = c and p.brand = b  and p.saleStatus=true
 and (p.titleMain like '%m%' or b.name like '%m%')
 group by p.productCategory order by count(distinct p.productId) desc

抱歉!评论已关闭.