Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT * FROM (
- SELECT thiscol, thatcol, ROW_NUMBER() OVER (ORDER BY mtime DESC, id) AS rownumber
- )
- WHERE rownumber BETWEEN 10 AND 20 -- care, 1-based index
- ORDER BY rownumber;
- ANSI Sql example:
- offset=41, fetchsize=10
- SELECT TOP(10) *
- FROM table1
- WHERE table1.ID NOT IN (SELECT TOP(40) table1.ID FROM table1)
Add Comment
Please, Sign In to add comment