#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    PK,CN
    Posts
    4
    Rep Power
    0
    I want to select the data from a table sorting desc of the insert order .
    That is I want to use select * from table desc; the standard SQL query.
    can I do it??
    thanks


    I'm sorry for my poor English!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    81
    Rep Power
    14
    So long as you have some kind of incrementing field for every insert (e.g. an autoincrement key) you can use:
    select * from mytable order by my_auto_increment_column DESC;

    I don't think there's an equivalent on Oracle's rowid in MySQL, so if you don't have an incrementing column (could be manually incremented, but autoincrement seems more likely) then you can't do it -- in that case, just add such a column.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    PK,CN
    Posts
    4
    Rep Power
    0
    Thanks,I got it.
    That is : if I have no column to sort,I can't use the order feather;I can't get my data sorted by the desc order they are insterted.
    I think this is a little bad.
    I love MySQL.

    sorry for my poor English.

Similar Threads

  1. League table problem
    By silverduck in forum MySQL Help
    Replies: 8
    Last Post: February 10th, 2004, 12:38 PM
  2. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  3. Replies: 1
    Last Post: January 20th, 2004, 01:39 PM
  4. select cell in table
    By frazzle in forum HTML Programming
    Replies: 6
    Last Post: January 20th, 2004, 09:52 AM
  5. select from table with parameter from another
    By PHPme in forum MySQL Help
    Replies: 9
    Last Post: January 14th, 2004, 08:26 PM

IMN logo majestic logo threadwatch logo seochat tools logo