Create a query that displays the employees' last names and commision amounts.If an employee does not earn commmission, put "No Commission." Label the column COMM.
RE: Create a query that displays the employees' last n...
Hi Suppose that you have a table EMP with the following structure.emp_id number(5)f_name varchar2(30)l_name varchar2(30)salary number(8 2)comm number(8 2) /* this column holds the commission values*/Now you can write your query as follows.SELECT l_name nvl(comm 'No Commission') commission from EMP;The above query will give the desired output.
RE: Create a query that displays the employees' last names and commision amounts.If an employee does not earn commmission, put "No Commission." Label the column COMM.
select ename nvl2(to_char(comm) to_char(comm) 'NO COMMISION') from emp
RE: Create a query that displays the employees' last names and commision amounts.If an employee does not earn commmission, put "No Commission." Label the column COMM.
select last_name "LAST NAME" nvl(comm "NO COMMISSION") commission from employees;
RE: Create a query that displays the employees' last names and commision amounts.If an employee does not earn commmission, put "No Commission." Label the column COMM.
select last_name "Emp LastName" nvl(Comm "No Comission") "COMM" from employee