WorksheetsMySQL Quiz
Total questions: 10
Worksheet time: 5mins
What does SQL stand for?
Structured Query Language
Super Query Language
Simple Query Language
Student Query Language
What is a primary key?
A unique attribute used to identify a single record
A key that is always a foreign key
A key that can be duplicated
A key that can be NULL
Which command is used to create a new database?
NEW DATABASE
CREATE DATABASE
CREATE TABLE
INSERT DATABASE
What is the purpose of the DELETE command?
To remove a table
To remove a column
To remove a database
To remove records from a table
Which of the following is a valid data type for strings in MySQL?
INTEGER
VARCHAR
FLOAT
BOOLEAN
What does the NOT NULL constraint do?
Allows NULL values in a column
Sets a default value for a column
Ensures a column cannot have a NULL value
Allows duplicate values in a column
Which command is used to modify existing records in a table?
CHANGE
ALTER
INSERT
UPDATE
What is the purpose of a foreign key?
To delete records
To create a new table
To maintain relationships between tables
To uniquely identify a record
What is the correct syntax to insert a record into a table?
INSERT INTO table_name (column1, column2) VALUES (value1, value2)
INSERT table_name VALUES (column1, column2)
INSERT table_name (column1, column2) VALUES (value1, value2)
INSERT INTO table_name (column1, column2) VALUE (value1, value2)
INSERT INTO table_name (column1, column12) VALUE (value1, value2)
Which of the following is NOT a MySQL data type for numbers?
CHAR
FLOAT
DECIMAL
TINYINT
