[KLUG Members] MySQL - select ... order by?

Todd Pillars todd at terralabs.com
Wed Jul 20 15:06:11 EDT 2005


Bruce Smith wrote:
> In a MySQL select, with the "order by" clause,
> my output is sorted case insensitive.
> 
> How can the output be displayed case sensitive?
You can force a case-sensitive sort by using the BINARY cast:
ORDER BY BINARY(field)

http://dev.mysql.com/doc/mysql/en/sorting-rows.html

Todd


More information about the Members mailing list