SQL Cheat Sheet/Fetch first rows

Use standard SQL row limiting syntax.

Section: Sorting and Limiting

Fetch first rows

sql
sql
SELECT *
FROM employees
ORDER BY salary DESC
FETCH FIRST 10 ROWS ONLY;
Explanation

Supported in many modern SQL engines and part of the SQL standard.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Sorting and Limiting
Limit returned rows
Return only the first N rows.
OpenIn sheetsqlsame section
Paginate with LIMIT and OFFSET
Skip rows and return a page-sized result set.
OpenIn sheetsqlsame section
Sort rows
Order query results ascending or descending.
OpenIn sheetsqlsame section
Select all columns
Return all columns from a table.
Filter with equality
Return rows matching an exact value.
Inner join two tables
Return rows with matches in both tables.