解决空值查询出现的错误引进的NVL函数,开发人员必备
select sal+NVL(comm,0) from emp;(针对数字空值型)
select NVL(to_char(comm),'No Commission') from emp;(针对字符空值)select NVL(to_date(hiredate),'31-DEC-99') from emp;(针对日期空值)
select ename,NVL(to_char(comm),ename||'not a salesperson') NVL from scott.emp