oracle数据库中字段类型是字符型,展示出来想按照数字大小排序有没有大佬指导一下~~
select 字段*1
排序的公式里用TOINTEGER()
order by 机台号-0
在SQL对要排序的字段to_number(要排序的字段) ,然后在order by 就行了,如下SQL:
select to_number(scode) scode from(
select '1' scode from dual
union all
select '2' from dual
select '11' from dual
)
order by scode