DBMS - Shwet.exp3 4
DBMS - Shwet.exp3 4
Shwet Singh
102256011
1. List the E_no, E_name, Salary of all employees working for MANAGER.
Code:
FROM EMPLOYEE
Output:
2. Display all the details of the employee whose salary is more than the Sal of any IT PROFF.
Code:
SELECT *
FROM EMPLOYEE
WHERE Salary > (SELECT MAX(Salary) FROM EMPLOYEE WHERE Designation = 'IT PROFF');
Output:
3. List the employees in the ascending order of Designations of those joined after 1981.
Code:
SELECT *
FROM EMPLOYEE
Output:
4. List the employees along with their Experience and Daily Salary.
Code:
Salary / 30 AS Daily_Salary
FROM EMPLOYEE;
Output:
Code:
SELECT *
FROM EMPLOYEE
Output:
Code:
SELECT *
FROM EMPLOYEE
7. List the employees who are working for the Deptno 10 or20.
Code:
SELECT *
FROM EMPLOYEE
Output:
Code:
FROM EMPLOYEE
9. Dislay the name as well as the first five characters of name(s) starting with ‘H’
Code:
FROM EMPLOYEE
Output:
10. List all the emps except ‘PRESIDENT’ & ‘MGR” in asc order of Salaries.
Code:
SELECT *
FROM EMPLOYEE
Final Table:
Code:
2 FROM (
4 UNION
6 ) AS CombinedDeptNumbers;
Output:
2. Display all the dept numbers available with the dept and emp tables.
Code:
1 SELECT Dept_no
2 FROM (
4 UNION ALL
6 ) AS CombinedDeptNumbers;
Output:
3. Display all the dept numbers available in emp and not in dept tables and vice versa.
Code:
2 SELECT Dept_no
3 FROM EMP
6 UNION
9 SELECT Dept_no
10 FROM DEPT
Output: