1) Display the details of all employees
ANS: select * from emp;
2) Display the dept information from department table
ANS: select * from dept;
3) Show the Employee Name, Employee No, Salary
ANS: select ename, empno,sal from emp;
4) SHOW EMPLOYEES WISE TOTAL MONTHLY SALARY ( MONTHLY SALARY = SAL + COMM)
FOR SOME EMPLOYEES COMMISSION IS NULL, WE HAVE TO REPLACE THEM BY 0(ZERO) TO PERFORM ARITHMETIC CALCULATION
ANS: SELECT ROWNUM, ENAME, EMPNO,SAL, COMM,SAL+ NVL(COMM,0) AS TOTAL_SALARY FROM SCOTT.EMP ;
ANS: select * from emp;
2) Display the dept information from department table
ANS: select * from dept;
3) Show the Employee Name, Employee No, Salary
ANS: select ename, empno,sal from emp;
4) SHOW EMPLOYEES WISE TOTAL MONTHLY SALARY ( MONTHLY SALARY = SAL + COMM)
FOR SOME EMPLOYEES COMMISSION IS NULL, WE HAVE TO REPLACE THEM BY 0(ZERO) TO PERFORM ARITHMETIC CALCULATION
ANS: SELECT ROWNUM, ENAME, EMPNO,SAL, COMM,SAL+ NVL(COMM,0) AS TOTAL_SALARY FROM SCOTT.EMP ;
No comments:
Post a Comment