Javatpoint Logo
Javatpoint Logo

SQLite LIMIT Clause

The SQLite LIMIT clause is used to limit the data amount fetched by SELECT command from a table.

Syntax:

The LIMIT clause can also be used along with OFFSET clause.

Example:

Let's take an example to demonstrate SQLite LIMIT clause. We have a table named 'STUDENT' having following data:

Sqlite Limit clause 1

Example1:

Fetch the records from the "STUDENT" table by using LIMIT according to your need of number of rows.

Output:

Sqlite Limit clause 2

Example2:

OFFSET is used to not retrieve the offset records from the table. It is used in some cases where we have to retrieve the records starting from a certain point:

Select 3 records form table "STUDENT" starting from 3rd position.

Output:

Sqlite Limit clause 3




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA