Database Systems Lab
Lab Task:7b (8)
Semester IV
Submitted to: Sir Irfan Naqvi
Submitted by: Rooha Tanveer
pg. 1
SQL in DBMS
Part 1:
Create a table EMPLOYEE with following schema:
(Emp_no, E_name, E_address, E_ph_no, Dept_no, Dept_name,Job_id , Salary)
Commands & Queries:
Table:
pg. 2
Part 2:
Add a new column; HIREDATE to the existing relation.
Commands & Queries
Table:
Part 3:
Change the datatype of JOB_ID from char to varchar2.
Existing datatype (char):
Checking table description:
Table Description:
pg. 3
Changing datatype to (varchar):
Commands & Queries:
Table Description:
Table:
Part 4:
Change the name of column/field Emp_no to E_no.
Commands & Queries:
pg. 4
Table:
Part 5:
Modify the column width of the job field of emp table
Commands & Queries:
Previous width of Job_id was char(10):
pg. 5
After altering the width to char(20):
Table:
pg. 6