I want get n-th to m-th records in a table, what\'s best choice in 2 below solutions:
Solution 1:
SELECT * FROM Table WHERE ID >= n AND ID <
They are different queries.
Assuming ID is a surrogate key, it may have gaps. ROW_NUMBER will be contiguous.
If you can guarantee you have no gaps in the data, then the 1st one because I'd hope it's indexed,. The 2nd one is more "correct" though.