hql如何查询总数

Query query = session.createQuery(hql);  

num = (new Integer(query.uniqueResult().toString()))   .intValue();  

原文地址:https://www.cnblogs.com/lemniscate317/p/5136417.html