SQLite OR Operator

The SQLite OR Operator is generally used with SELECT, UPDATE and DELETE statement to combine multiple conditions. OR operator is always used with WHERE clause and the complete condition is assumed true if anyone of the both condition is true.

Syntax:

snippet
SELECT column1, column2, columnN 
FROM table_name
WHERE [condition1] OR [condition2]...OR [conditionN]

You can combine multiple number of conditions using OR operator.

Example:

We have a table named 'STUDENT' having following data:

Sqlite Or clause 1

Select all students from the table 'STUDENT' WHERE age is greater than or equal to 25 OR fees is greater than or equal to 15000.00

snippet
SELECT * FROM STUDENT WHERE AGE >= 25 OR FEES >= 15000;

Output:

Sqlite Or clause 2
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents