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

DataBMS Lab 2

This document outlines tasks for a database management systems lab, including: 1. Performing basic data retrieval queries on an employee database table to list employee names, IDs, departments and other details under various conditions. 2. Creating reports to display employee names, jobs, hire dates, salaries and other attributes by filtering on specific criteria and sorting results. 3. Practicing both basic and advanced SQL queries using operators like IN, NOT IN, LIKE and concatenation. The lab aims to introduce students to database concepts and MySQL through hands-on practice of selecting, filtering, sorting and displaying data from an example employee database table.

Uploaded by

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

DataBMS Lab 2

This document outlines tasks for a database management systems lab, including: 1. Performing basic data retrieval queries on an employee database table to list employee names, IDs, departments and other details under various conditions. 2. Creating reports to display employee names, jobs, hire dates, salaries and other attributes by filtering on specific criteria and sorting results. 3. Practicing both basic and advanced SQL queries using operators like IN, NOT IN, LIKE and concatenation. The lab aims to introduce students to database concepts and MySQL through hands-on practice of selecting, filtering, sorting and displaying data from an example employee database table.

Uploaded by

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

Data Base and Management System Lab

CSL-220
 

Lab journal 2
 

Student’s Name: Arsalan Ishtiaq


Enrolment number(s): 01-134182-013
Class: BSCS-4B
 
 
 
 
 

Department of Computer Sciences


BAHRIA UNIVERSITY, ISLAMABAD
Lab # 2:
 Introduction to Database and Database Management System
 Installation and Configuration
 Course Outcome and Importance
 Basic Data retrieval queries(Select, Distinct, As, Concatenation and Arithmetic Operations)

Lab Tasks

1. List the name and empno of managers who earn more than 2000. Display the result in
alphabetical order of the name.

2. Display all employee names which have ‘TH’or ‘LL’ in them.


3. List the details of the employees in the depts of 10 & 20 in the order of empno.

4. Display the information about the managers and clerks from the column ‘Job’ in the table emp,order the
result by deptno.

5. List the empnames that don’t end with ‘s’.


6. List the emp names that begin with ‘c’.
7. List the names of the employees starts with T/t and ends with R/r.

8. List the name of employees who joined during 1981.


9. List the data as shown below
”Smith has held the position of clerk in dept 20 since 19 june,1982”
10. List all rows in employee table by converting commission column to zero.
11. Provide the empno and employee name whose salary is greater than 10,00
12. List all employees, sorted by job

13. List departments which are in Multan?


14. Which employees get salary less than 20,000 and commission greater than 100.

15. List the names and salary of all employees, except for Jones.
16. Find the empno, job, and hire date of all doctors and managers hired after 1990. (use IN )

17. Find the empno, job, and hire date of all Clerks and managers hired before 1990. (don’t use IN )

18. List the numbers of all employees who do not earn commission.
19. List the departments except research. Without using like

20. List departments which are in Boston?


21. Create a report to display the name and job title of all employees who do not have a manager.

Submit the lab journal in next class.

You might also like