What kind of erroneous results? How is the personal_id field defined? The statement you have is syntacically correct so it must be something in the data. If the personal_id is a numeric ID and you're storing it as characters, this will sort differently than if you're sorting by number. Remember, as text, sort order would be 1, 10, 11, 2, 21, 22, etc...
Regards, Ron Vishakha Mali_Wagh wrote: > > Hi all, > > I have been using mysql since long time. But suddenly I noticed that, there is no >function for sorting intervalues from the tabel. > Clarifying more.... > If I have a set of employee numbers and i need to sort them in descending order, I >found that it gives erroneous results. > The query is: > select personal_id from Emp_table order by personal_id DESC > > Am I missing something or do i need to write the query differently? Please help. > Regards, > -vishakha. > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php