MySQL OR

MySQL OR

MySQL OR syntax and examples.

MySQL OR syntax

SELECT * FROM table_name
WHERE condition
OR condition;

Table books

IDNAMEPRICE
1book120.0
2book225.0
3book315.0

OR example

SELECT * FROM books 
WHERE id > 1 
AND (price > 10 OR price < 25);

Query Result

IDNAMEPRICE
2book225.0
3book315.0