0% found this document useful (0 votes)
6 views

DBMS Lab 3

The document is a lab assignment submitted by Prathmesh Bansal for the Database Management Systems course. It contains 30 queries to be performed on the EMP and DEPT tables, along with the expected output for each query. The queries include listing data from the tables, combining columns, adding calculations to salaries, filtering on conditions, and joining tables.

Uploaded by

Dustin Henderson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

DBMS Lab 3

The document is a lab assignment submitted by Prathmesh Bansal for the Database Management Systems course. It contains 30 queries to be performed on the EMP and DEPT tables, along with the expected output for each query. The queries include listing data from the tables, combining columns, adding calculations to salaries, filtering on conditions, and joining tables.

Uploaded by

Dustin Henderson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Prathmesh Bansal 0801IT201067

SHRI G.S. INSTITUTE OF TECHNOLOGY & SCIENCE,


INDORE

Department of Information Technology

Subject Code: IT-38513


Subject Name: Database Management System

Lab Assignment 3

Name: Instructor:
Prathmesh Bansal Mukesh Sakle Sir
Enrollment Number:
0801IT201067

1
Prathmesh Bansal 0801IT201067

Que.1: Perform the following queries:


1. List all rows of the table EMP.
Query:

Output:

2. List all rows of the table DEPT.


Query:

Output:

3. List all employee numbers and employee names from EMP.


Query:

Output:

2
Prathmesh Bansal 0801IT201067

4. List all distinct jobs from EMP.


Query:

Output:

5. List all employees data in the format : SMITH IS A CLERK…..


Query:

Output:

6. List employees names, Sal and annual sal from Emp table.
Query:

Output:

3
Prathmesh Bansal 0801IT201067

7. Develop a salary sheet from emp table consisting of empno, ename, job, sal,
comm, house rent computed at 25% of sal, Medical Allowance at 15% of
sal, Transport Allowance at 10% of sal, and Net salary consisting of sal,
house rent, medical allowance, transport allowance and comm. of the
employees.

Query:

Output:

8. List all employees who are managers.


Query:

Output:

4
Prathmesh Bansal 0801IT201067

9. List of all employees who are either manager or employees.


Query:

Output:

10. List of all employees who are managers of department number 10.
Query:

Output:

11. List of all employees who are clerks of department number 10.
Query:

Output:

12.List of all employees who are not managers.


Query:

Output:

5
Prathmesh Bansal 0801IT201067

13. List of all employees who are working in department number 10.
Query:

Output:

14. List of all employees who are not working in department number 10,12.
Query:

Output:

15. List of all employees who are either manager of department number 10 or
are analysts.
Query:

Output:

6
Prathmesh Bansal 0801IT201067

16.Change the column heading Job into designation.


Query:

Output:

17.List all salesmen and add 500 rupees in each salary.


Query:

Output:

18.List all employees having a salary between 2000 and 3000.


Query:

Output:

7
Prathmesh Bansal 0801IT201067

19.List all employees and find 5% from each salary.


Query:

Output:

20.Find the 10% of the manager's salary.


Query:

Output:

21.Find the daily wedges of each employee.


Query:

Output:

8
Prathmesh Bansal 0801IT201067

22. Combine ename and job from emp.


Query:

Output:

23. Combine ename, job and salary from emp.


Query:

Output:

9
Prathmesh Bansal 0801IT201067

24. Join ename and job, then change the column heading as comp_name.
Query:

Output:

25. List all records as follows: Smith is clerk and he is working in Dept no
20 Since 12-Mar-1981.
Query:

Output:

10
Prathmesh Bansal 0801IT201067

26. Find those employees whose commission is less than their salaries.
Query:

Output:

27. Find those employees whose mgr is 7902, 7566, 7788.


Query:

Output:

28. List all employees whose name starts with 'S'.


Query:

Output:

29. List all employees having the last letter in their name 'R' or 'N'.
Query:

Output:

11
Prathmesh Bansal 0801IT201067

30. List all employees having the first letter in their name 'W', or 'K' and they
don't belong to department number 10 or 20.
Query:

Output:

12

You might also like