表達式: NVL(filed, replace)php
NVL函數的做用是在查詢碰見field的值爲null是,使用replace將null替換,改變其爲null的查詢值.oracle
NVL可以轉換任何數據類型,但前提是replace的類型樣式要和原filed定義相同.函數
SELECT NVL(table_name, 'unknow'), NVL(owner, 'unknow') FROM all_tables;
當某行的owner爲null(空)時,用字符串 'unkonw' 來替代.spa
參考: https://www.techonthenet.com/oracle/functions/nvl.phpcode