Home » SQLite Where Clause

SQLite Where Clause

by Online Tutorials Library

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:

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

Output:

Sqlite Where clause 2

Example2:

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

Output:

Sqlite Where clause 3

Example3:

Select all students from STUDENT table where age is either 25 or 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

You may also like