I would like to get the bottom 5 items from the top in mysql.

Asked 2 years ago, Updated 2 years ago, 40 views

It's just like the title

says.
 select * from column order by created desc limit 5;

If you do this, of course it will be displayed in descending order.

5
4
3
2
1

appears in

This is

1
2
3
4
5

I'd like to.

If possible, I would appreciate it if you could include a specific code for the SQL statement.

mysql

2022-09-30 19:05

1 Answers

(From comments)

 (select * from column order by created desc limit 5) order by created asc;

How about now?


2022-09-30 19:05

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.