TheDeveloperBlog.com

Home | Contact Us

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

SQLite Where Clause

SQLite Where 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 WHERE Clause

The SQLite WHERE clause is generally used with SELECT, UPDATE and DELETE statement to specify a condition while you fetch the data from one table or multiple tables.

If the condition is satisfied or true, it returns specific value from the table. You would use WHERE clause to filter the records and fetching only necessary records.

WHERE clause is also used to filter the records and fetch only specific data.

Syntax:

SELECT column1, column2, columnN 
FROM table_name
WHERE [condition]

Example:

In this example, we are using WHERE clause with several comparison and logical operators. like >, <, =, LIKE, NOT, etc.

We have a table student having the following data:

Sqlite Where clause 1

Example1:

Select students WHERE age is greater than or equal to 25 and fees is greater than or equal to 10000.00

SELECT * FROM STUDENT WHERE AGE >= 25 AND FEES >= 10000.00; 

Output:

Sqlite Where clause 2

Example2:

Select students form STUDENT table where name starts with 'A' doesn't matter what come after 'A'.

SELECT * FROM STUDENT WHERE NAME LIKE 'A%';

Output:

Sqlite Where clause 3

Example3:

Select all students from STUDENT table where age is either 25 or 27.

SELECT * FROM STUDENT WHERE AGE IN ( 25, 27 );

Output:

Sqlite Where clause 4

Example4:

Select all students from STUDENT table where age is neither 25 nor 27.

Output:

Sqlite Where clause 5
Next TopicSQLite And Clause




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