TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

SQLite Limit Clause

SQLite Limit Clause with history, features, advantages, installation, commands, syntax, datatypes, operators, expressions, databases, table, crud operations, clauses, like, glob, limit, and clause, advance sqlite

<< Back to SQLITE

SQLite LIMIT Clause

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

Syntax:

SELECT column1, column2, columnN 
FROM table_name
LIMIT [no of rows] 

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

SELECT column1, column2, columnN 
FROM table_name
LIMIT [no of rows] OFFSET [row num] 

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.

SELECT * FROM STUDENT LIMIT 5; 

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.

SELECT * FROM STUDENT LIMIT 3 OFFSET 2; 

Output:

Sqlite Limit clause 3




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf