MySQL Database Activity 1

MySQL Database Activity 1

This activity will test your knowledge on basic sql statements. To review our MySQL Lessons and Tutorials, kindly visit this link MySQL Tutorials Compilation. The answers can be found on our facebook page or you can download the answers here.

1. Create a student Database

2. Create a table (student_data) under the student database that contains the following entity:

a. id – int unsigned not null auto_increment primary key
b. lname – varchar(20)
c. mname – varchar(20)
d. fname – varchar(20)
e. contact – int(20)
f. address – varchar(25)

3. Issue the command to describe the property of your table.

4. Insert the following data in student_data table:

“Pascual”, “Milby”, “Rolan”, 09293831491, “Hongkong”

“Gates”, “Peter”, “Tyron”, 09091234567, “China”

“Pitt”, “John”, “Ondoy”, 09123456985, “USA”

“Stewart”, “Orlando”, “James”, 09439503945, “USA”

5. Issue the command that will display all the record in the student_data table.

6. Update the lname of student into Bogrot and the fname Mark where the address is China.

7. Issue the command to display the fname, lname and contact of students where their address is USA.

8. Delete the record of student whose id is 2.

9. Update the contact of students into 123456789 whose address is Hongkong.

10. Display the address, contact and fname of students whose id is 1.

, , ,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.