Suggest an editImprove this articleRefine the answer for “What does LIMIT do in SQL?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)`LIMIT` in SQL is used to cap the number of rows a query returns, e.g. `SELECT * FROM Employees LIMIT 5;` returns only the first 5 records. **Key point:** it's often paired with `ORDER BY`, to pick, say, the top 5 by salary; in some DBMSs (PostgreSQL, MySQL) you can add `OFFSET` to skip a portion of the rows.Shown above the full answer for quick recall.Answer (EN)Image`LIMIT` in SQL is used to **restrict the number of rows** a query returns. **Syntax:** ```sql SELECT Column1, Column2 FROM Table_Name LIMIT N; ``` **Example:** ```sql SELECT * FROM Employees LIMIT 5; ``` ### What this query does - Returns **only the first 5 records** from the `Employees` table. - The rest of the records are ignored. **Notes:** - Often paired with `ORDER BY`, to pick, say, the **top 5 by salary**: ```sql SELECT Name, Salary FROM Employees ORDER BY Salary DESC LIMIT 5; ``` - Some DBMSs (PostgreSQL, MySQL) let you set an **offset**: ```sql LIMIT 5 OFFSET 10; -- pick 5 rows, skipping the first 10 ``` > Put simply, `LIMIT` lets you **control how many rows** a query returns, which is handy for large tables or picking top results.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.