Syntax

SQL Limit Rows Syntax

In SQL, limit rows: returns only the first N rows — SELECT * FROM users LIMIT 10;

Quick Answer

Syntax
SELECT * FROM users LIMIT 10;
SQLSyntax

Limit Rows

Code example
SELECT * FROM users LIMIT 10;

Returns only the first N rows.

Tip: SQL Server uses SELECT TOP 10 instead.

Learn More

How to limit rows in SQL

  1. Open your SQL file or editor.
  2. Copy the example, then replace its sample names and values for your code.

Tip: SQL Server uses SELECT TOP 10 instead.

SQL Limit Rows Syntax

Use SELECT * FROM users LIMIT 10;.

Related Syntax References

Frequently asked questions

What is the SQL syntax for limit rows?

Use this pattern: SELECT * FROM users LIMIT 10;

Can I copy this SQL code example?

Yes. Use Copy code and adapt the example to your program.

Is this SQL syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify