Preamble
Oracle/PLSQL NVL function allows you to replace the value when there is a Null value.
Oracle/PLSQL syntax of NVL functions
NVL( string1_id, replace_with_id )
Parameters or arguments
- string1_id – string which is checked for a Null value.
- replace_with_id – the return value if string1 is Null.
NVL function in the following versions of Oracle/PLSQL
|
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
|
Let’s look at some examples of the Oracle NVL function and learn how to use the NVL function in Oracle PLSQL.
SELECT NVL(suppl_city, 'n/a')
FROM suppls;
The SQL query above will return ‘n/a’ if the suppl_city field contains a Null value. Otherwise, it will return the suppl_city value.
Another example of using NVL function in Oracle/PLSQL:
SELECT suppl_id,
NVL(suppl_desc, suppl_name)
FROM suppls;
SQL query will return suppl_name field if suppl_desc contains Null. Otherwise, it will return suppl_desc.
Last example of using NVL function in Oracle/PLSQL:
SELECT NVL(commission, 0)
FROM sales;
SQL query will return 0 if the commission field contains Null value. Otherwise, it will return the commission field value.
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 AIOps and Database Observability Improve SLA Compliance for Enterprise Applications
- 28 July 2026
- Database Performance Management
Introduction In today’s digital-first economy, enterprise applications power nearly every critical business process—from online banking and e-commerce platforms to healthcare systems, ERP applications, and customer service portals. Organizations promise customers and stakeholders high availability, rapid response times, and consistent application performance through Service Level Agreements (SLAs). However, meeting strict SLA targets has become increasingly challenging. … Continue reading “How AIOps and Database Observability Improve SLA Compliance for Enterprise Applications”
How to Optimize Hospitality Operations with Enteros Database Software, AI-Powered Analytics, and Database Observability
Introduction The hospitality industry has evolved into a highly digital, customer-centric business where every guest interaction depends on fast, reliable, and intelligent technology. Hotels, resorts, casinos, restaurants, vacation rentals, convention centers, and hospitality management companies process millions of transactions every day involving reservations, guest check-ins, room assignments, housekeeping, food and beverage services, loyalty programs, event … Continue reading “How to Optimize Hospitality Operations with Enteros Database Software, AI-Powered Analytics, and Database Observability”
How to Optimize Food and Beverage Manufacturing with Enteros Database Software, Operational Intelligence, and Cloud FinOps
Introduction The food and beverage industry operates in a highly competitive, fast-moving, and tightly regulated environment where efficiency, product quality, food safety, and supply chain reliability determine business success. Manufacturers must manage thousands of products, rapidly changing consumer demand, seasonal production cycles, strict regulatory requirements, and global distribution networks while maintaining profitability. Today’s food and … Continue reading “How to Optimize Food and Beverage Manufacturing with Enteros Database Software, Operational Intelligence, and Cloud FinOps”
The Role of Intelligent Database Analytics in Optimizing Hybrid Cloud Performance
- 27 July 2026
- Database Performance Management
Introduction Hybrid cloud has become the preferred IT strategy for modern enterprises seeking the flexibility of public cloud services while maintaining control over critical workloads in private cloud and on-premises environments. Organizations across banking, healthcare, retail, manufacturing, telecommunications, and government sectors increasingly rely on hybrid cloud architectures to balance scalability, compliance, cost efficiency, and application … Continue reading “The Role of Intelligent Database Analytics in Optimizing Hybrid Cloud Performance”