How to display last 10 records and sort them in mysql?

There is a table:
id name
1 name
2 name
3 name
4 name
5 name
6 name
7 name
8 name
9 name
10 name
11 name
12 name

Need to get last 10 records in the same order
ie obtained 3 to 12

SELECT * FROM events ORDER BY id ASC LIMIT 10;
Display 1-11
SELECT * FROM events ORDER BY id DESC LIMIT 10;
Lead 12-3

And need to write from 3 to 12
July 9th 19 at 13:05
2 answers
July 9th 19 at 13:07
Solution
SELECT * FROM (SELECT * FROM events ORDER BY id DESC LIMIT 10) t ORDER BY id;
July 9th 19 at 13:09
You just need to set OFFSET.

SELECT * FROM events ORDER BY id ASC LIMIT 2, 10;

Find more questions by tags MySQL