Table of ContentsPreviousNext

Ispirer             Ispirer


Ispirer SQLWays データベース移行ソフトウェア

COALESCE

Syntax

COALESCE(expr1 {, exprN })

COALESCE はNULLでない最初の引数を返します。引数は指定された順に評価されます。この関数は通常NULL値をNULLでない値に置き換えるために使用されます。

Example

この例では、全ての本のタイトルと価格を選択しています。もし、該当タイトルの価格がNULLの場合、価格は0.00と表示されます。

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

他のデータベースでの同等機能

TABLE 90. 他DBの同等機能
IBM DB2
COALESCE 関数
Oracle
NVL 関数


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