SQLite Select Top Syntax
The "select top" syntax is a syntax used by certain databases to limit the returned rows to the first N rows of a query.
SQLite does have a way to select the top N rows from an SQL query, but the syntax does not use the top keyword. Instead, the limit keyword must be used.
For example, databases that support the top syntax may use the following syntax to return the first 20 rows from a query:
select top 20 * from sales
The SQLite equivalent of the above syntax would be the following:
select * from sales limit 20
SQLite also gives the ability to limit the number of rows with an offset from the first row. That can be achieved using the limit N offset Y syntax.