從結果中刪除一些行

ISO / ANSI SQL:

SELECT Id, Col1
FROM TableName
ORDER BY Id
OFFSET 20 ROWS

MySQL 的:

SELECT * FROM TableName LIMIT 20, 42424242424242;
-- skips 20 for take use very large number that is more than rows in table

甲骨文:

SELECT Id,
   Col1
FROM (SELECT Id,
           Col1,
           row_number() over (order by Id) RowNumber
      FROM TableName)
WHERE RowNumber > 20

PostgreSQL 的:

SELECT * FROM TableName OFFSET 20;

SQLite 的:

SELECT * FROM TableName LIMIT -1 OFFSET 20;