Loading lesson path
Concept visual
Start at both ends
clause is used to limit the number of records to return.clause is useful on large tables with thousands of records. Returning a large number of records can impact performance. The following SQL selects only the first 3 records of the "Customers" table:
Select only the first 3 records of the Customers table:
SELECT TOP 3 * FROM Customers;Not all database systems support the SELECT TOP clause. MySQL supports the LIMIT clause to select a limited number of records, while Oracle uses
n ROWS ONLY.
Formula
Syntax for SQL Server / MS Accessnumber | percent column_name(s)
table_name
condition
;column_name(s)
table_name
condition
number
;Syntax for Oracle 12+
column_name(s)
table_name
column_name(s)
number
ROWS ONLY;Customers table used in the examples: