The nvl() function return an alternative value when an expression is NULL.
Syntax:
NVL(string, replaceWith)
Where:
string : represents the string to test for a null value.
replaeWith : represents the value returned if string is null.
Example:
SELECT NVL(cus_city, 'n/a') FROM customers;
Related topics
- What is DBMS?
- What is RDBMS?
- Difference between DBMS and RDBMS
- What are various DDL commands in SQL?
- What are various DML commands in SQL?
- What are various DCL commands in SQL?
- Can you sort a column using a column alias?
- Is a null value same as zero or a blank space if not then what is the difference?
- How can you eliminate duplicate rows from a query result?
- Difference between TRUNCATE, DELETE and DROP commands?
- What is the difference between CHAR and VARCHAR2 datatype in SQL?
- What are the differences between sql and pl/sql?
- What are the transaction properties in sql?
- What is the sql case statement used for?
- How many types of aggregate functions are there in sql?
- What are scalar functions in sql?
- What is the difference between sql and mysql?
- What is the use of nvl function in sql?
- What do you mean by subquery?
- What are Indexes in SQL?
- How to create index in oracle sql?
- How to view index in oracle sql?
- How to get list of tables in oracle sql
- Difference between clustered and nonclustered indexes in oracle sql?
- How to update with select subquery in sql server
- Explain different types of index in sql server