LIMIT clause
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.
LIMIT子句限制SELECT语句返回的行数。通常,此子句与ORDER BY一起使用,以确保结果具有确定性。
The following example selects the first 3 rows in Orders table.
以下示例选择Orders表中的前3行。
SELECT *
FROM Orders
ORDER BY orderTime
LIMIT 3