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

or 

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

相关文章: