SELECT * FROM TAB_NAME

ORDER BY case when regexp_like(SORT, '^([0-9]+)$') then
TO_NUMBER(SORT)
else
999999999
END,
SORT

 

上面那句标准,但是在IBATIS 不能用

select
SORT
from TAB_NAME
order by to_number(regexp_substr(sort,'[0-9]*[0-9]',1)),sort

相关文章: