From: Martijn Tonies Date: June 9 2005 8:27am Subject: Re: ORDER BY and ENUM -- not alphabetical List-Archive: http://lists.mysql.com/mysql/185221 Message-Id: <010f01c56ccd$04cc71d0$3802a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit > Or put the members alphabetically in the enum definition in the first > place ... Better yet - drop the ENUM al together :-) Use a lookup table. With regards, Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL Server Upscene Productions http://www.upscene.com > -- > felix > > On 09/06/2005, Eric Bergen wrote: > > > > It's not a bug at all. You just hit one of the features of enum :) > > > > If you want to order alphabetically as you describe cast the enum > > name to a string like this select col from t order by concat(my_enum); > > > > -Eric > > > > Daevid Vincent wrote: > > > > > Please tell me there is a way to fix this "bug" in mysql Ver 12.22 > > > Distrib 4.0.18, for pc-linux-gnu (i686) > > > > > > I have a column defined like so: > > > Type > > > enum('Schedule','Report','Admin','Search','General','License','Acces > > > s') > > > > > > If I SELECT, and ORDER BY Type, it is ordering in the order defined > > > by the the ENUM, not alphabetically as a sane person would expect. > > > UGH! > > > > > > Please tell me there is a fix or work around.