|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Can I use select * from table desc? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|