8323514-Class_12_IP_WS10
8323514-Class_12_IP_WS10
Worksheet, 2021-22
1) A relation named Employee is given here, you can see the structure of relation. Solve the following
query based on below given structure of relation.
1.Add one column into employee relation for storing department id of an employee.
2.Write a query to change the data type of department to varchar with size of 20 and it should be
NOT NULL.
3.Write a query to make your ID column as a primary key.
4.Write a query to change the name of ID column to EMP_ID.
5.Write a query to change the relation name to EMP_DATA
6.Write a query to drop Department Id column.
7. Write a query to update the name of employee with ID number 2 to “SHRAVAN KUMAR”.
8. Write a query to delete the information of Production department.
9. Write a query to drop the employee relation.
2) Consider the following relation named TEACHER and answet the questions:
1| 0 1 - 0 2 - 2 0 2 2 / P R E P A R E D B Y : K h u s h b u J o s h i | I C T D e p t .
6 Disha Math 1980-03-17 PRT F 21000
Seghal
7 Sonali Math 1980-11-17 TGT F 24500
Mukherjee
2| 0 1 - 0 2 - 2 0 2 2 / P R E P A R E D B Y : K h u s h b u J o s h i | I C T D e p t .