Giriş
Açıklaması şöyle
You may use the NVL function to replace null values with a default value. The function returns the value of the second parameter if the first parameter is null. If the first parameter is anything other than null, it is left alone.
This function is used in Oracle, not in SQL and MySQL. Instead of NVL() function, MySQL have IFNULL() and SQL Server have ISNULL() function.
Örnek
manager_id NUMBER ise şöyle yaparız.
manager_id NUMBER ise şöyle yaparız.
select
department_id, department_name, manager_id,
NVL(cast(manager_id as varchar2(10)), 'na') "BONUS_AMT"
from
departments
order by 1;
Hiç yorum yok:
Yorum Gönder