Loading lesson path
Concept visual
Start at both ends
SELECT TOP, LIMIT and ROWNUM Keywords
❮ SQL Keywords
SELECT TOP, LIMIT and ROWNUM
LIMIT,
or
command is used to specify the number of records to return.SELECT TOP. MySQLuses LIMIT, and Oracle uses ROWNUM. The following SQL statement selects the first three records from the "Customers" table (SQL SERVER):
SELECT TOP 3 * FROM Customers;The following SQL statement shows the equivalent example using the LIMIT clause (MySQL):
SELECT * FROM Customers
LIMIT 3;The following SQL statement shows the equivalent example using ROWNUM (Oracle):
SELECT * FROM Customers
WHERE ROWNUM <= 3;❮ SQL Keywords