You are on page 1of 4

Lab Tasks

Q#01: Create a table/relation according to following scenario. There are many


employees in the organization with attribute of; Employee ID, Name, Phone
Number, Address, Hire-Date, Age, etc.
 Insert cell values upto 10 rows as given
EmpID Name Phone_Number Address Hire-date Age
101` Ali 0312-4567893 House 12-10-1996 26
no299,
Faisal town
Lahore
102 Ahmad 0314-9876544 Bahriya 11-9-1990 30
town Lahore
103 Ahsan 0341-7896543 Cantt Multan 1-2-1998 35
raza
104 Gulfam 0342-6543213 Bahriya 30-6-1997 33
Ali Karachi
105 Ali 0346-2345671 Johar town 13-4-2001 37
Asghar Faisalabad
106 Ghualam 0322-6578943 Multan 12-5-2000 40
Mustafa
107 M. 0301-3456219 Farid Town 11-8-1990 35
Imran Sahiwal

 Delete the record of Employee Name= Ali Asghar


 Show the record after deletion
 Show only the EmpID and name of the employee.

Step No #1
Create Database.
Step No #2
Name the database

Step No #3
Apply Queries
Step No #4
Create Table

Query:
CREATE TABLE DETAILS (
EmpID int NOT NULL PRIMARY KEY,
E_Name varchar(255) NOT NULL,
Phone_Number varchar(20),
E_Address varchar(700),
Hire_Date Date,
Age Int
);

You might also like