Welcome to JavaRanch
But that
is the natural order. If it is a varchar, then it is a type of "text" and "text" is sorted in alphabetical order like that. Suggest you download them with
JDBC, parse them to Integer (or Long or BigInteger) objects with a radix of 0x10, put them in an array, List<Number> or similar, then sort them.
Is there a built-in function in SQL which parses text into numbers? I don't remember seeing it. It is worthwhile going through the Oracle handbooks to see whether there is a special PLSQL or Oracle function like that.