子查询吧,下面是我写的hql语句"from User where age=(select max(age) from User) "相应的sql语句是SELECT * FROM USER WHERE AGE=(SELECT MAX(AGE) FROM USER); 楼上回答的不完整,那样只会返回最大的年龄
select max(age) from User