Professional Documents
Culture Documents
Muhammad Fahad CMS: 356324: Submitted To: Waqas Ahmed
Muhammad Fahad CMS: 356324: Submitted To: Waqas Ahmed
Muhammad Fahad CMS: 356324: Submitted To: Waqas Ahmed
CMS: 356324
Submitted to: Waqas Ahmed
17-12-2020
DATABASE SYSTEMS
LAB-7
TASKS
Task-1: Display the departments that are accredited by the quality council.
STEPS
First we CREATE the table “EMPLOYEE”
then select the names of the department which are accredited by using the SELECT
clause
Task-3 Write a query to output the name, job, empno, deptname and
location for each dept, even if there are no employees.
STEPS
First, we take the same table “EMPLOYEE” and “DEPARTMENT” from the earlier task
Then by using RIGHT JOIN we display the data as requested
Task-4: Find the name of the manager for each employee. Include the
following in the output: empno, empname, job and his manager’s
name.
STEPS
First, we take the same table “EMPLOYEE” and “DEPARTMENT” from the last task
Then using the join clause and AS clause we display the query as asked
Task-5: Display the details of those who draw the same salary
STEPS
First, we take the same table “EMPLOYEE” from the last task
Then using SELF JOIN we display the details of the person that draws same salary as
shown
=====================================================================================
THANK YOU