Example 2: LIMIT Clause with Using WHERE Clause
Unlike previous example, we are going to display some specific records only. We will display some specific number of records with the help of LIMIT and WHERE clause.
Query:
SELECT *
From w3wiki
WHERE course = 'Python'
LIMIT 2;
Output:
Explanation : In this example, we have specified that we only want those records where course column has ‘Python’ in it. We also specified that, we only want to display first 2 records. As we can see in the above image, there are only two records with ‘Python’ in there course column.
How To Limit The Number Of Rows Returned In SQLite
SQLite is a lightweight and self-contained relational database management system in short RDBMS. It supports standard SQL syntax. It is designed as a simple and easy-to-use database. It requires very less configurations which makes it very easy for developers to integrate it into any application. In this article, we are going to explore the topic “how to limit the number of rows returned in SQLite“. We are going to explore its basic concepts with some clear and concise examples.