AND & OR Condition


 

SQLite: AND & OR Conditions

This SQLite tutorial explains how to use the AND condition and the OR condition together in a SQLite query with syntax and examples.

 

Description:
The SQLite AND condition and OR condition can be combined in a SELECT, INSERT, UPDATE, or DELETE statement.

 

Syntax:

 

Parameters or Arguments:

condition1, condition2, … condition_n

The conditions that are evaluated to determine if the records will be selected.

Note: The SQLite AND & OR conditions allow you to test multiple conditions. Don’t forget the order of operation round brackets!.

 

Examples:
The following SQL statement selects all employee’s from hire date “2014-01-01” AND the position must be equal to “developer” OR “research analyst”, in the “Employee” table:

id name position hire_date
100 chiru developer 1/1/2014
104 jaya developer 1/1/2014
107 anitha research analyst 1/1/2014