Setting Up a Table in the Database
Before moving to some examples, we need to create a table in our database first. We will need a table in our database in order to perform some operations on it.
Table : w3wiki
Creating the table
CREATE TABLE w3wiki (
id INTEGER PRIMARY KEy,
name TEXT,
course TEXT,
potd_streak INTEGER
);
Adding data to our table and displaying it
--adding data
INSERT INTO w3wiki(id, name, course, potd_streak)
VALUES(101,'Vishu','Python',280);
INSERT INTO w3wiki(id, name, course, potd_streak)
VALUES(102,'Aayush','Java',250);
INSERT INTO w3wiki(id, name, course, potd_streak)
VALUES(103,'Neeraj','Python',180);
INSERT INTO w3wiki(id, name, course, potd_streak)
VALUES(104,'Sumit','JavaScript',190);
INSERT INTO w3wiki(id, name, course, potd_streak)
VALUES(105,'Vivek','Java',100);
INSERT INTO w3wiki(id, name, course, potd_streak)
VALUES(106,'Harsh','Python',50);
INSERT INTO w3wiki(id, name, course, potd_streak)
VALUES(107,'Amit','C++',220);
--displaying our table's data
SELECT * From w3wiki;
Output:
Now we are ready as we have done with creating the table.
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.
Contact Us