It depends on which type column is.
If it is numeric type, their values compared:
with your_table as (
select stack(2, 7423.00, 9.60) as TAUX_REMU_RESEAU
)
select * from your_table order by TAUX_REMU_RESEAU desc;
Result:
your_table.taux_remu_reseau
7423
9.6
If it is string:
with your_table as (
select stack(2, '7423.00', '9.60') as TAUX_REMU_RESEAU
)
select * from your_table order by TAUX_REMU_RESEAU desc;
Result:
your_table.taux_remu_reseau
9.60
7423.00
Strings are compared lexicographically:
This is the definition of lexicographic ordering.
If two strings are different, then either they have different characters at some index that is a valid index for both strings, or their lengths are different, or both. If they have different characters at one or more index positions, let k be the smallest such index; then the string whose character at position k has the smaller value, as determined by using the < operator, lexicographically precedes the other string. In this case, compareTo
returns the difference of the two character values at position k
in the two string - that is, the value: this.charAt(k)-anotherString.charAt(k)
If there is no index position at which they differ, then the shorter string lexicographically precedes the longer string. In this case, compareTo
returns the difference of the lengths of the strings - that is, the value: this.length()-anotherString.length()
See the String.compareTo source code for better understanding:
public int compareTo(String anotherString) {
int len1 = value.length;
int len2 = anotherString.value.length;
int lim = Math.min(len1, len2);
char v1[] = value;
char v2[] = anotherString.value;
int k = 0;
while (k < lim) {
char c1 = v1[k];
char c2 = v2[k];
if (c1 != c2) {
return c1 - c2;
}
k++;
}
return len1 - len2;
}
compareTo
method returns after comparing characters at 0 position (k=0): 7 and 9.