You are on page 1of 1

Woldia University

Department of Software Engineering

Fundamentals of database system Worksheet

Questions: Answer the following questions based on the required instructions

1) Create StudentList database


2) In StudentList database create student table which has the following fields: Stud_Id it is
primary key, Name, LastName, Address, Sex (add default constraint) with the correct data
type and not null constraint.
3) Add column age to Student table and add Check constraint.
4) Change attribute of Name from varchar (20) to FirstName varchar (30)
5) Drop column Address from Student table
6) Insert this values in to student table

Stud01 Alemu Beyene 20 M


Stud02 Habtamu Zekiyos 22 M
Stud03 Tsion Gemechu 20 F
Stud04 Danawit Tezera 19 F
Stud05 Mekdes Yezbalem 22 F

7) Change LastName to Surafeal whose Id number is Stud02.


8) Change age to 23 whose id number Stud04
9) Delete student from student table whose Id number is Stud04
10) Display Stud_Id, FirstName of a student whose Id number is Stud01
11) Display Stud_Id, FirstName, Age from the table whose Id number is Stud02 and Stud03.
12) Display the entire student from the table by sorting their FirstName ascending order
13) Display FirstName, LastName and Age of the student by sorting their LastName descending
order
14) Display top 2 records from the table

USER 1

You might also like