LIMIT 语句

Batch

LIMIT clause constrains the number of rows returned by the SELECT statement. In general, this clause is used in conjunction with ORDER BY to ensure that the results are deterministic.

The following example selects the first 3 rows in Orders table.

  1. SELECT *
  2. FROM Orders
  3. ORDER BY orderTime
  4. LIMIT 3