Table of ContentsPreviousNext

Ispirer
Please, note, that Ispirer SQLWays 6.0 is no longer supported and provided to clients.
You can try out automated conversion of databases and applications with Ispirer Toolkit for free. Download free trial.
Check out the relevant toolkit documentation.
Ispirer SQL Server Migration overview.


Ispirer SQLWays Database Migration Software

COALESCE

Syntax

COALESCE(expr1 {, exprN })

COALESCE returns the first expression that is not NULL. The expressions are evaluated in the order in which they are specified. This function is usually used to replace NULL values with a not NULL value.

Example

This example selects title and price for all books. If the price for a given title is NULL, the price shown is 0.00.

SELECT title, COALESCE(price, 0.00) AS price
FROM titles; 

Equivalents in other databases

TABLE 90. Equivalents in other databases
IBM DB2
COALESCE function
Oracle
NVL function


Table of ContentsPreviousNext
Copyright 1999-2023 Ispirer Systems.
Ispirer and SQLWays are registered trademarks. All other product names may be trademarks of the respective companies.
All rights reserved.