There is a simple way to get top N rows from any table:
SELECT TOP 10 * FROM MyTable ORDER BY MyColumn
Is there any efficient way to query M rows starting from row N
For example,
Id Value
1 a
2 b
3 c
4 d
5 e
6 f
And query like this
SELECT [3,2] * FROM MyTable ORDER BY MyColumn /* hypothetical syntax */
queries 2 rows starting from 3d row, i.e 3d and 4th rows are returned.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…