Sql Query To Use a ' SELECT ' statement with OR Operator


To use two or more conditions to retrieve, insert, update and delete records from the existing created table. And from this, anyone condition have to meet. Then we can use a ' WHERE ' statement with OR conditions.

In this statement, it will retrieve the first_name start with specific syntax “su” or employee_id is greater than 150 from the table employees.

In this, anyone conditions (first_name LIKE “su%”) or (employee_id>150) will be met.

Note- OR Condition not only used in SELECT but also INSERT, UPDATE and DELETE.

Enter - Select * from table_name;
SQL Query
SELECT * FROM employees WHERE first_name LIKE 'su%' OR employee_id>150;
Output