0% found this document useful (0 votes)
16 views6 pages

Lab08 DBS (Rooha-223563)

The document discusses making changes to a table in a database including adding a column, changing a data type, renaming a column, and modifying a column width. SQL commands are provided.

Uploaded by

Rooha Tanveer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views6 pages

Lab08 DBS (Rooha-223563)

The document discusses making changes to a table in a database including adding a column, changing a data type, renaming a column, and modifying a column width. SQL commands are provided.

Uploaded by

Rooha Tanveer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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

You might also like