You are on page 1of 1

UNIVERSITY OF RIZAL SYSTEM

IT 6 – Database Management System


SQL Activity

1. Create a new database. Format of database name: activity_yourlastname (5 pts)


2. Create table consumertb. (5 pts)

Field Type Size Required


consumerid Int Yes
lastName Varchar 25 Yes
firstName Varchar 25 Yes
middlename Int
age Varchar 25

3. Add the following fields on consumertb table: town varchar(20); gender varchar(20) (5pts)
4. Make consumerid as the primary key (5 pts)
5. Change the field middlename to MI varchar(5) (5 pts)
6. Change the datatype of age to INT (5 pts)
7. Insert the following records. Use the INSERT syntax with SET on record#1 and record#2; use INSERT
syntax with VALUES on record#3 and record#4. (20 pts)
Field Record #1 Record #2 Record #3 Record #4
consumerid 101 102 103 104
lastName Alarcon Cruz Valencia Pinto
firstName Jerry Mira Leslie Lora
MI P F O
age 25 24 25
town Manila Taguig Makati
gender Male Female Female

You might also like