null value nvl function problem
875255Sep 18 2012 — edited Sep 18 2012hi,
i have a table named "SAL" with two columns "NAME" and "SALARY".
"NAME" column got varchar2 data type and "SALARY" column got number data type.
Here's the command
select nvl(salary,0) from sal where name='steve';
now if the table got an entry where name is steve and the salary is null then it will return 0 due to nvl function.
but if there is no entry with name steve the result will be null.
I want if even there is no entry named steve in the table the result must be 0 instead of null. what will be the command?