SQL SKIP TAKE (Pagination) Limiting amount of results

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

ISO/ANSI SQL:

SELECT * FROM TableName FETCH FIRST 20 ROWS ONLY;

MySQL; PostgreSQL; SQLite:

SELECT * FROM TableName LIMIT 20; 

Oracle:

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

SQL Server:

SELECT TOP 20 * 
FROM dbo.[Sale]


Got any SQL Question?