Saturday, January 22, 2011

ORACLE Part 4

Many Times, NULL appears in our result.
To Avoid NULL, we have to use the following function
If NVL Function used with Character then NVL (Char_Column,'ABC')
If NVL Function used with Number then NVL (Numb_Column,0)

Select ename, sal, comm, sal+comm from emp;
Select ename, sal, comm, sal+comm, sal+nvl(comm,0) from emp;
Select ename, sal, comm, sal+comm, sal+nvl(comm,1000) from emp;

No comments:

Post a Comment