Oracle
 sql >> Database >  >> RDS >> Oracle

Ordina le versioni come numeri

Puoi usare regexp_substr() :

order by fname,
         cast(regexp_substr(version, '[^.]+', 1, 1) as number),
         cast(regexp_substr(version, '[^.]+', 1, 2) as number),
         cast(regexp_substr(version, '[^.]+', 1, 3) as number)