hql to_number

select max(cast(o.ordernum,int)) from className o

or 

select max(cast(o.ordernum as int)) from className o

原文地址:https://www.cnblogs.com/fashflying/p/5364068.html