MySQL OR

Last Updated: March 12, 2022

You can use OR logical operator with SELECT, INSERT and UPDATE

OR operator separates the multiple conditions.

At least one condition should be true to get the result set.

Syntax

WHERE
condtionA OR condtionB OR conditionC

Example

Select the name list of employees whose age is greater than 40 or salary is greater than 100,000

SELECT name FROM employees WHERE age > 40 OR salary > 100000
Test