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 to Optimize Media and Entertainment Database Performance with Enteros Database Software, AI-Powered Analytics, and Database Observability
- 30 August 2026
- Database Performance Management
Introduction The media and entertainment industry has become a digital-first business. Streaming services, digital publishing, online gaming content, advertising platforms, social experiences, content management systems, subscription platforms, and personalized recommendations all depend on databases. Modern media companies process enormous volumes of customer, content, advertising, transaction, and behavioral information. Read more”Indian Country” highlights Enteros and its … Continue reading “How to Optimize Media and Entertainment Database Performance with Enteros Database Software, AI-Powered Analytics, and Database Observability”
How to Optimize Manufacturing Database Performance with Enteros Database Software, AIOps, and Predictive Analytics
Introduction Manufacturing is becoming increasingly dependent on digital infrastructure. Modern factories use enterprise resource planning (ERP), manufacturing execution systems (MES), supply-chain platforms, warehouse management systems, industrial IoT, quality management applications, predictive maintenance, and advanced analytics to manage production. Behind these systems are databases processing enormous amounts of operational information. Production schedules, inventory levels, machine data, … Continue reading “How to Optimize Manufacturing Database Performance with Enteros Database Software, AIOps, and Predictive Analytics”
The Future of Industry-Specific Cloud Optimization with AIOps, FinOps, and AI-Powered Database Management
- 28 August 2026
- Database Performance Management
Introduction Cloud computing has become a foundational component of digital transformation across industries. Banking organizations use cloud platforms to support digital payments and online banking. Healthcare providers rely on cloud infrastructure for digital health applications and patient services. Educational institutions operate learning management systems and virtual classrooms in the cloud. Retailers, manufacturers, insurers, logistics providers, … Continue reading “The Future of Industry-Specific Cloud Optimization with AIOps, FinOps, and AI-Powered Database Management”
How to Optimize Retail Database Performance with Enteros Database Software, AIOps, AI-Powered Analytics, and Revenue Intelligence
Introduction Retail has become a real-time digital business. Ecommerce, mobile applications, point-of-sale systems, inventory platforms, loyalty programs, customer analytics, supply chain systems, recommendation engines, and payment platforms all depend on databases. Retailers also experience highly variable demand. Read more”Indian Country” highlights Enteros and its database performance management platform *Black Friday, holiday shopping, product launches, flash … Continue reading “How to Optimize Retail Database Performance with Enteros Database Software, AIOps, AI-Powered Analytics, and Revenue Intelligence”