Professional Documents
Culture Documents
SEP
SEP
SAL
----------
1600
2975
2850
2450
3000
5000
3000
7 rows selected.
===================================================================================
========================================================
Q 2)WAQTD all the details of the employee if designation is Manager.
SQL> select *
2 from emp
3 where JOB = 'MANAGER';
===================================================================================
========================================================
Q 3) WAQTD Employee name, Department no., Date of joining if the date of joining is
“01-JAN-1995”.
no rows selected
===================================================================================
========================================================
Q 4) WAQTD all the details of employee only if they were hired after the year 1995.
SQL> SELECT *
2 FROM EMP
3 WHERE HIREDATE > '31-DEC-1995';
no rows selected
===================================================================================
========================================================
Q 5) WAQTD department name, department number for all the department which is
located in NEW YORK.
DNAME DEPTNO
-------------- ----------
ACCOUNTING 10
===================================================================================
========================================================
Q 6) WAQTD Department number along with location whose Department is Research.
SQL> SELECT DEPTNO DEPT_NO, LOC LOCATION
2 FROM DEPT
3 WHERE DNAME = 'RESEARCH';
DEPT_NO LOCATION
---------- -------------
20 DALLAS
===================================================================================
========================================================
Q 7) WAQTD Salary ,Annual salary , Quarter salary of all the employees if salary is
greater than commission.
===================================================================================
========================================================
Q 8) WAQTD Employee name , Monthly salary , Job of all the employees who’s monthly
salary is greater than 2000.
SQL> SELECT *
2 FROM EMP
3 WHERE DEPTNO=20;
===================================================================================
========================================================
Q 10) WAQTD Salary , Annual salary, 10% Hike in Quarter salary if and only if
designation is Clerk.
===================================================================================
========================================================
Q 11) WAQTD details of the employee who’s name is Ford.
SQL> SELECT *
2 FROM EMP
3 WHERE ENAME = 'FORD';
===================================================================================
========================================================
Q 12) WAQTD Annual salary , 1000 rs bonus in annual salary along with monthly
salary if department number is 30.
SQL> SELECT SAL*12, (SAL*12)+1000, SAL
2 FROM EMP
3 WHERE DEPTNO = '30';
===================================================================================
========================================================
Q 13) WAQTD all the details of department if location is BOSTON.
SQL> SELECT *
2 FROM DEPT
3 WHERE LOC = 'BOSTON';
===================================================================================
========================================================
Q 14) WAQTD Salary , Quarter salary , 5% decrement in monthly salary if the job is
Manager.