I want to use the DECODE function to
display the column value if it is not null, and if the column value is null then I want to print a string:
select empno, empname, decode(empphone,from emp;
HOW DO I DO THIS ?
Thanks.
Printable View
I want to use the DECODE function to
display the column value if it is not null, and if the column value is null then I want to print a string:
select empno, empname, decode(empphone,from emp;
HOW DO I DO THIS ?
Thanks.
select empno, empname, decode(empphone, null, 'Phone Is NULL', empphone) from emp ;
Thanks Pinakin,
I just figured out that I can also use NVL to do the same thing.
select nvl(fieldname,'Field is NULL!') from mytable;