Intro
I have been using new databases such as mysql and mariaDB for the last few years.
For a project I am now using oracle after many years and I was surprised to see that Oracle order by
is case sensitive... UpperCase characters go above LowerCase characters for example in ASC.
Is this behavior following the SQL specifications? Do the general SQL language specs outline what the behavior should be or is it up to each vender?
I'm asking because many years of using mysql/mariaDB made me consider order by to be case insensitive.
Mysql
I see for example that in the documentation for mysql:
On character type columns, sorting—like all other comparison operations—is normally performed in a case-insensitive fashion. This means that the order is undefined for columns that are identical except for their case. You can force a case-sensitive sort for a column by using BINARY like so: ORDER BY BINARY col_name.
From: http://dev.mysql.com/doc/refman/5.7/en/sorting-rows.html