现在我有字段类似与“信息1”,“信息11”这样的字段,现在我想根据字段中的数字排序,请问这个用SQL怎么实现?

解决方案 »

  1.   

    order by translate(字段,'1234567890.'||字段,'1234567890.')
      

  2.   


    translate(col,'1234567890'||col,'1234567890')+0
    --or
    to_number(translate(col,'1234567890'||col,'1234567890'))  1* select translate('信息11','1234567890'||'信息11','1234567890') from dual
    SQL> /TR
    --
    11
      

  3.   

    order by regexp_substr(col,'[[:digit:]]+')+0
      

  4.   

    10g或以上用order by to_number(regexp_substr(col,'\d+')),
    10g以下版本用translate吧
      

  5.   

    order by to_number(regexp_substr(col,'\d+')),