I want to select last X rows from a table, so what I did was:
SELECT * FROM table ORDER BY id DESC LIMIT 120
and it worked, but I want it to be ordered ascending, so I tried with:
SELECT * FROM table ORDER BY id DESC LIMIT 120 ORDER BY id ASC
expecting that it would reorder selected rows, but it didn't work.
So how can I achieve it?
LIMIT
clause. If you use another DBMS (eg SQLite), please edit accordingly.