OR Condition


 

SQLite: OR Condition

This SQLite tutorial explains how to use the SQLite OR Condition with syntax and examples.

 

Description:
The SQLite OR Condition is used to test two or more conditions where records are returned when any one of the conditions are met. It can be used in a SELECT, INSERT, UPDATE, or DELETE statement.

 

Syntax:

 

Parameters or Arguments:

condition1, condition2, … condition_n

Any of the conditions that must be met for the records to be selected.

Note: The SQLite OR condition allows you to test 2 or more conditions. The SQLite OR condition requires that any of the conditions (ie: condition1, condition2, condition_n) be must be met for the record to be included in the result set..

 

Examples:
The following SQLite statement selects all the employee’s from the Position “developer” or the hire_date “2014-01-01”, in the “Employee” table:

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