Thread: Sort row

  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Rep Power

    Sort row

    Is it possible to sort a row in mysql. I know I can do it in excel but not sure how to do it in mysql

    For example

    Column1 Column2 Column3
    0 2 1

    after sorting will be

    Column1 Column3 Column2
    0 1 2

    If you got idea please kindly telling me thanks.
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Toronto Canada
    Rep Power
    Originally Posted by heroviper
    Is it possible to sort a row in mysql.

    the best you can do is specify the columns in the order that you want

    if your columns are "sortable" then they are probably all the same type of data, in which case you should normalize | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo