The following query:
SELECT department_name, NVL(last_name,'NO EMPLOYEE') "LAST NAME" FROM employee E FULL OUTER JOIN Department D ON department_number=d.department_number; WHERE department_number IN(402,600);
returns:
Department_name LAST NAME --------- -------------------- Software Support Crane New Department NO EMPLOYEE
In this example, the NVL function returned the result as last_name column value from the employee table and for the cases where the last_name value is NULL, the function returned the result as NO EMPLOYEE.