Lab # 1 Exploring Ms SQL Express Edition, Retrieving Data From Database
Lab # 1 Exploring Ms SQL Express Edition, Retrieving Data From Database
LAB # 1
OBJECTIVE
Overview of the features of ms sql server edition and retrieve data from your database using
select statement.
LAB TASK
1. Create below tables
Page | 1
Lab # 1: Exploring MS SQL Express edition, retrieving data from database (SWE-209)
2. Update the above schema with the following given details and insert 25 records
Employee (empNo, fname, lname, address, DOB, gender, position, deptNo)
Page | 2
Lab # 1: Exploring MS SQL Express edition, retrieving data from database (SWE-209)
Page | 3
Lab # 1: Exploring MS SQL Express edition, retrieving data from database (SWE-209)
2. List names and addresses of all employees who work for the IT department.
Room (roomNo, hotelNo, type, price) o (Hint:Type can “S” for Single , “D” for double ,
“F” Family)
Page | 6
Lab # 1: Exploring MS SQL Express edition, retrieving data from database (SWE-209)
Page | 7
Lab # 1: Exploring MS SQL Express edition, retrieving data from database (SWE-209)
b) List the name and addresses of top five guests living in the “Karachi” city .
Page | 8
Lab # 1: Exploring MS SQL Express edition, retrieving data from database (SWE-209)
c) List Room type with a price less than Rs.4000 per night.
d) List Room type with a price not equal to Rs.7000 per night
Page | 9
Lab # 1: Exploring MS SQL Express edition, retrieving data from database (SWE-209)
.
f) List the top 60% of hotel which are booked after Jan 2020.
Page | 10
Lab # 1: Exploring MS SQL Express edition, retrieving data from database (SWE-209)
Page | 11