Preamble
The Oracle OR condition (also called the OR statement) is used to check several conditions in which records are returned when a particular condition is true. It can be used in SELECT, INSERT, UPDATE or DELETE.
Syntax for OR condition in Oracle/PLSQL
WHERE condition1
OR condition2
…
OR condition_n;
Parameters and arguments of the condition
- condition1, condition2, condition_n – All conditions that must be met for the selected records.
condition1 OR condition2 logic:
| condition1 | condition2 | condition1 OR condition2 |
| TRUE | TRUE | TRUE |
| TRUE | FALSE | TRUE |
| TRUE | NULL | TRUE |
| FALSE | TRUE | TRUE |
| FALSE | FALSE | FALSE |
| FALSE | NULL | NULL |
| NULL | TRUE | TRUE |
| NULL | FALSE | NULL |
| NULL | NULL | NULL |
Note:
- Oracle condition OR allows checking 2 or more conditions.
- The Oracle condition OR requirement, so that all conditions (condition1, condition2, condition_n) must be met for the entries that are included in the resulting set.
Example with the SELECT operator
The first example of the Oracle OR condition, which we will consider, is included in the SELECT operator with 2 conditions:
SELECT *
FROM customers
WHERE state = 'Nevada'
OR available_credit > 700;
This example Oracle OR conditions will return all customers who are either in state ‘Nevada’ or available_credit above 700. Since SELECT uses *, all fields from the customers table will fall into the result set.
Example of a SELECT operator (with 3 conditions)
The following example of the Oracle OR condition is a SELECT operator with 3 conditions. If any of these conditions are not met, the record will be included in the result set.
SELECT supplier_id
FROM suppliers
WHERE supplier_name = 'INTEL'
OR city = 'Boston'
OR offices > 7;
This example Oracle condition OR will return all supplier_id values where supplier_name is either ‘INTEL’ or city ‘Boston’ or offices is greater than 7.
Example with the INSERT operator
Oracle condition OR can be used in INSERT operator.
For example:
INSERT INTO suppliers
(supplier_id, supplier_name)
SELECT account_no, name
FROM customers
WHERE city = 'Las Vegas'
OR city = 'Denver';
This Oracle example OR condition will insert into the suppliers table, all account_no records, name from the customers table that are in the city ‘Las Vegas’ or ‘Denver’.
Example with UPDATE operator
Oracle condition OR can be used in UPDATE operator.
For example:
UPDATE suppliers
SET supplier_name = 'Nike'
WHERE supplier_name = 'Adidas'
OR available_products < 9;
This example Oracle condition OR will update all values in the supplier_name field of the supplier table in ‘Nike’ where supplier_name was ‘Adidas’ or its availabe_products was less than 9.
Example with DELETE
Oracle condition OR can be used in DELETE operator.
For example:
DELETE FROM suppliers
WHERE supplier_name = 'Epson'
OR employees >= 60;
In this Oracle example, the OR conditions will remove all entries from the suppliers table whose supplier_name was ‘Epson’ or their employees were greater than or equal to 60.
PL/SQL tutorial: WHILE Loop in Oracle Database
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
How Enteros Transforms Healthcare Cost Management with AI Financial Intelligence and Database Performance Optimization
- 4 December 2025
- Database Performance Management
Introduction The healthcare sector is facing unprecedented financial and operational pressure. As medical organizations modernize their IT environments—embracing AI-driven diagnostics, telemedicine platforms, electronic health record (EHR) systems, imaging repositories, and cloud-native applications—the cost of operating these digital workloads continues to surge. At the same time, inefficiencies within databases, data pipelines, clinical software platforms, and analytics … Continue reading “How Enteros Transforms Healthcare Cost Management with AI Financial Intelligence and Database Performance Optimization”
Optimizing Retail Digital Operations: Enteros AI Platform for Accurate Cost Estimation and Superior Performance Management
Introduction The retail sector is undergoing one of the fastest digital transformations in history. From omnichannel commerce and predictive analytics to inventory automation and personalized customer experiences, today’s retail enterprises depend on complex, high-volume digital systems. These systems—spanning eCommerce platforms, databases, cloud services, POS solutions, and logistics software—process massive real-time workloads that directly influence customer … Continue reading “Optimizing Retail Digital Operations: Enteros AI Platform for Accurate Cost Estimation and Superior Performance Management”
How Technology Teams Improve Performance Management with Enteros’ AIOps and AI-First Operations Framework
- 3 December 2025
- Database Performance Management
Introduction The technology sector is undergoing a rapid transformation as cloud-native architectures, SaaS ecosystems, and real-time data systems redefine how organizations operate. Yet with this digital acceleration comes an overwhelming surge in complexity — distributed microservices, multi-cloud deployments, AI-augmented workflows, and massive data pipelines that demand precision, speed, and resilience. To navigate this complexity, enterprises … Continue reading “How Technology Teams Improve Performance Management with Enteros’ AIOps and AI-First Operations Framework”
The Future of Healthcare Databases: Enteros’ GenAI and AI Performance Management at Work
Introduction The healthcare sector is undergoing a digital revolution unlike anything seen before. From AI-assisted diagnostics and precision medicine to telehealth platforms and clinical research systems, today’s healthcare organizations rely heavily on massive data ecosystems. Databases power everything — electronic health records (EHRs), patient management systems, revenue cycle applications, insurance claim platforms, imaging archives, and … Continue reading “The Future of Healthcare Databases: Enteros’ GenAI and AI Performance Management at Work”