When comparing strings explicitly using <
>
<=
>=
, or implicitly using ORDER BY
, the sort order is based on binary character values. This results in the following sorting behavior:
Sorting is case-sensitive. UPPERCASE characters are sorted before lowercase in ascending order. For example, aardvark
will come after Zebra
when sorting in ascending order.
Sorting is accent-sensitive. Characters with accents (diacritics) are compared and sorted according to their UTF-8 binary representation. For example, Ă…hus
is sorted after both Axberg
and Zoo
in ascending order.