I can do SELECT TOP (200) ... but why not BOTTOM (200)?
Well not to get into philosophy what I mean is, how can I do the equivalent of TOP (200) but in reverse (from the bottom, like you'd expect BOTTOM to do...)?
Try only this:- SELECT * FROM reset ORDER BY ASC LIMIT (FOUND_ROWS() - 3), 3 and check if it is giving the last 3 rows from your table in ascending order!!!
mysql> SELECT * FROM ( -> SELECT * FROM Last10RecordsDemo ORDER BY id DESC LIMIT 10 -> )Var1 -> -> ORDER BY id ASC; The following is the output that displays the last 10 records. We can match both records with the help of the SELECT statement.
From SSMS 2008 R2, right-clicking a table we can select "Edit Top 200 Rows" or "Select Top 1000 Rows."
SELECT columns FROM ( SELECT TOP 200 columns FROM My_Table ORDER BY a_column DESC ) SQ ORDER BY a_column ASC
It is unnecessary. You can use an ORDER BY
and just change the sort to DESC
to get the same effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With