select SUBSTRING_INDEX(group_concat(b.id order by b.credate desc),',',1) from Table as b
where b.IdentityID is not null group by b.IdentityID
mysql里没问题,在hibernate中报错org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: order near line 1,
...全文
1516打赏收藏
mysql语句,不能在hibernate下执行
select SUBSTRING_INDEX(group_concat(b.id order by b.credate desc),',',1) from Table as b where b.IdentityID is not null group by b.IdentityID mysql里没问题,在hibernate中报错org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: order