Return only the first N rows.
Section: Sorting and Limiting
Limit returned rows
sql
sql
SELECT *
FROM logs
ORDER BY created_at DESC
LIMIT 50;Explanation
LIMIT is widely supported, though standard SQL also supports FETCH FIRST.
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