You are on page 1of 3

Table Creation and Data loading Assignment

Submitted to: Sir Dr. Jamal Nasir


Submitted By: Syed Shahbaz Raza
2920-FBAS/BSSE/F15-A
Q1. List all employees whose middle name is 'A'

Sol.

SQL query: SELECT * FROM employee WHERE minit=A

Screenshot:
Q2. Display all locations of departments

Sol. Both queries are applicable

SQL query: SELECT dlocation, dnumber FROM dept_locations order by dlocation

Or

SELECT department. dnumber,department.dname,dept_locations.dlocation FROM


department,dept_locations

(Note: sir I used order by location to make sequence in columns in this case alphabetical order study
it from w3school)

Q3. List all names of departments


SQL query: SELECT dname, dnumber FROM department order by dname

Screenshot: