On character type columns, sortinglike all other comparison operationsis normally per- formed in a case-insensitive fashion. This means that the order will be undened for columns that are identical except for their case. You can force a case-sensitive sort by using the BINARY cast: ORDER BY BINARY(field). To sort in reverse order, add the DESC (descending) keyword to the name of the column you are sorting by
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.
The default sort order is ascending, with smallest values first. To sort in reverse (descending) order, add the DESC keyword to the name of the column you are sorting by