0
0
MySQLquery~10 mins

Database creation and selection in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new database named 'school'.

MySQL
CREATE DATABASE [1];
Drag options to blanks, or click blank then click option'
Aschool
Bcreate
Ctable
Duse
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' or 'table' instead of the database name.
Forgetting to specify the database name.
2fill in blank
medium

Complete the code to select the database named 'library' for use.

MySQL
USE [1];
Drag options to blanks, or click blank then click option'
Acreate
Btable
Clibrary
Dselect
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' or 'select' instead of the database name.
Forgetting the semicolon at the end.
3fill in blank
hard

Fix the error in the code to create a database named 'company'.

MySQL
CREATE [1] company;
Drag options to blanks, or click blank then click option'
Atable
Bselect
Cuse
Ddatabase
Attempts:
3 left
💡 Hint
Common Mistakes
Using CREATE TABLE instead of CREATE DATABASE.
Using USE or SELECT in place of DATABASE.
4fill in blank
hard

Fill both blanks to create and then select a database named 'shop'.

MySQL
[1] DATABASE shop; [2] shop;
Drag options to blanks, or click blank then click option'
ACREATE
BDROP
CUSE
DSELECT
Attempts:
3 left
💡 Hint
Common Mistakes
Using DROP instead of CREATE to make the database.
Using SELECT instead of USE to select the database.
5fill in blank
hard

Fill all three blanks to create a database named 'music', select it, and then drop it.

MySQL
[1] DATABASE music; [2] music; [3] DATABASE music;
Drag options to blanks, or click blank then click option'
ACREATE
BUSE
CDROP
DSELECT
Attempts:
3 left
💡 Hint
Common Mistakes
Using SELECT instead of USE to select the database.
Using DROP before creating the database.