let's suppose I have this table, where I deleted the row with rowid=3:
rowid | something
------+-----------
开发者_JAVA技巧1 | ...
2 | ...
4 | ...
5 | ...
How to select the third row (the one with rowid=4) ?
select * from table limit 2,1
Means something like "start from index 2 and return 1 row."
select * from yourtable order by rowid limit 1 offset 2;
Will get you the third row in that sorted result set (offset is 0-based).
select Max(row_id) from ( select * from table_name limit 3)
精彩评论