Table of ContentsPreviousNext

Ispirer             Ispirer


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

NVL

構文

NVL(expr1, expr2)

もし expr1 がNULLの場合、この関数は expr2 を返します。もし expr1 がNULL出ない場合、この関数は expr1 を返します。NVL関数は通常NULL値を特定の値で置き換えるために使用されます。

Example

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

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

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

TABLE 83. 他DBの同等機能
IBM DB2
COALESCE 関数
Microsoft SQL Server
ISNULL および COALESCE 関数


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.