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
Enteros for Insurance: Redefining AI Performance, Data Lake Management, and Cloud FinOps Excellence
- 7 October 2025
- Database Performance Management
Introduction The insurance industry stands at the crossroads of transformation — where data-driven insights, artificial intelligence (AI), and cloud technologies are reshaping business operations. Today’s insurers operate in a digital-first world, collecting and analyzing enormous volumes of data from multiple channels — customer interactions, policy applications, claims, IoT devices, and third-party providers. This explosion of … Continue reading “Enteros for Insurance: Redefining AI Performance, Data Lake Management, and Cloud FinOps Excellence”
Revolutionizing Healthcare IT: How Enteros AIOps and Observability Platforms Are Transforming Database Performance Management
Introduction In today’s data-driven healthcare landscape, precision, speed, and reliability are paramount. From real-time patient monitoring and electronic health records (EHRs) to AI-assisted diagnostics and predictive analytics, healthcare organizations rely on massive databases and complex IT infrastructures to deliver life-saving insights and services. However, as data volumes surge and systems become more distributed, managing database … Continue reading “Revolutionizing Healthcare IT: How Enteros AIOps and Observability Platforms Are Transforming Database Performance Management”
From Data to Delivery: How Enteros Transforms D2C Brands Through Database Performance and Cloud FinOps
- 6 October 2025
- Database Performance Management
Introduction In the fast-evolving world of Direct-to-Consumer (D2C) brands, agility and performance are everything. D2C businesses thrive on personalization, speed, and customer trust — all of which depend on how efficiently data flows through their systems. Behind every product recommendation, every smooth checkout, and every on-time delivery is a complex network of databases, cloud infrastructure, … Continue reading “From Data to Delivery: How Enteros Transforms D2C Brands Through Database Performance and Cloud FinOps”
How Enteros AI Performance and Data Lake Optimization Are Powering Innovation in the Fashion Industry
Introduction The fashion industry, once ruled by instinct and creativity alone, is now undergoing a seismic transformation driven by data and artificial intelligence (AI). From forecasting trends to managing supply chains and customer experiences, data-driven insights are redefining how fashion brands operate. Central to this digital shift is the use of AI-driven performance management and … Continue reading “How Enteros AI Performance and Data Lake Optimization Are Powering Innovation in the Fashion Industry”