Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CHENNAI PUBLIC SCHOOL

TH ROAD * SH 50 * THIRUMAZHISAI * CHENNAI – 600 124


UNIT III : WORKSHEET 2 : SQL DDL
CLASS: XII SUBJECT : COMPUTER SCIENCE (083) DATE : 10.03.2023

1 Create the below given tables EMP and DEPT as described below :
DEPT :
Dno Number
DNAME VARCHAR
LOC VARCHAR
EMP
ENO number , ENAME varchar, JOB char , SAL number, DNO number
a)Create both tables as given above
b) Insert 10 records each
c) Modify the size of the column LOC by 15 in the DEPT table
d) Add a new column COMNT in the table DEPT
e) Drop the column JOB from the table
f) Delete the table EMP from the database.
2 Create a table student (sname(30 chars), sid, s_stream(20 chars), scity)
Perform the following queries..
a)Describe the fields of the table. (hint: use sp_help command)
b)Add a new field named fees to the table and it must contain some values.
c)Modify the field s_stream so that it can accept upto 30 characters.
d)Insert 10 student records
e)Display the student details.
f)Drop a column fees
g)Rename the table. (hint: command sp_rename)
h) Drop the table

You might also like