sql - Display employee name,total salary of each employee(total salary=salary+commission) -
display employee name, total salary of each employee. conditions: if commission not null total salary=(salary + commission) else total salary = salary ; here table: table name: myemp columns: empno [primary key], name, salary, commission, deptno create table myemp ( empno number primary key, name varchar2(20), salary number, commission number, deptno number ); query: select name, salary, commission, (salary + ((salary*commission) / 100)) "total_salary" myemp; this query give incorrect result. when commission null , total_salary = 0 . should total_salay=salary ; how fix this? my table below: sql> select * emp; empno ename job mgr hiredate sal comm deptno 7369 smith clerk 7902 17-dec-80 800 20 7499 allen salesman 7698 20-feb-81 1600 300 30 7521 ward salesman 7698 22-...