LIMIT

SQL LIMIT Keyword

The LIMIT clause is used to restrict the number of records returned by a query. It is supported by MySQL and SQLite, including our TechKubo playground.

Note: SELECT TOP is used in SQL Server, and ROWNUM is used in Oracle for the same purpose.

Tutorials dojo strip

SQL LIMIT Syntax

SQL

SQL LIMIT First 3 Patients Example

This query selects the first 3 rows from the Patients table.

SQL

SQL LIMIT First 5 Appointments Example

This query selects the first 5 rows from the Appointments table.

SQL

SQL LIMIT Labs

Tutorials dojo strip