This quiz will test your understanding of creating and managing databases and tables in MySQL. You will explore fundamental concepts such as using the CREATE DATABASE and CREATE TABLE statements, defining primary keys, handling NULL values, working with AUTO_INCREMENT, and specifying default values. Additionally, you will learn about storage engines, how to modify and delete tables, and the impact of different table constraints.
1.
How do you retrieve the structure of a table (select all that apply)?
2.
Which MySQL storage engine is transaction-safe?
3.
Which SQL statement allows you to change the structure of an existing table?
4.
What is the function of the MEMORY storage engine?
5.
Which keyword prevents a column from storing NULL values?
6.
Which statement is used to select a database for use?
7.
How do you remove all data from a table without deleting the table itself?
8.
Which SQL keyword is used to assign a default value to a column?
9.
Which SQL statement is used to create a new database?
10.
Which of the following can also be used to create a new database?
11.
Which of the following is NOT a valid MySQL storage engine?
12.
What must a column have to be defined as a primary key?
13.
Which statement is used to delete a table from a database?
14.
How can you avoid an error when creating a database that might already exist?
15.
Which command is used to check the default storage engine in MySQL?
16.
What is the correct SQL command to create a table?
17.
Which command displays a list of all databases on the server?
18.
What happens if you try to create a database that already exists?
19.
Which statement is used to delete an entire database?
20.
What happens if you try to insert a NULL value into a NOT NULL column?