MySQL Database Quiz Questions

Course Name:MySQL
Chapter Name:Chapter 5 - DDL (Data Definition Language)
Lesson Content Link:Data Types
Current Quiz Count:30
Progress
0%
Q1
Single Choice

Which of the following is a valid integer data type in MySQL?

Q2
Single Choice

Which MySQL data type is used to store date values?

Q3
Single Choice

What data type in MySQL should be used to store long text?

Q4
Single Choice

In MySQL, which data type is best suited for storing currency values?

Q5
Single Choice

Which MySQL data type would you use to store a value that can only be true or false?

Q6
Single Choice

In MySQL, what is the maximum length of a VARCHAR data type?

Q7
Single Choice

Which MySQL data type should be used to store IP addresses?

Q8
Single Choice

Which data type in MySQL is used for storing large binary objects?

Q9
Single Choice

In MySQL, which data type would you use for precise storage of very large numbers?

Q10
Single Choice

Which MySQL data type is used to store fixed-length strings?

Q11
True / False

In MySQL, the INT data type is used to store integer values.

Q12
True / False

The VARCHAR data type in MySQL can only store up to 255 characters.

Q13
True / False

The DATE data type in MySQL is used to store date values in the format 'YYYY-MM-DD'.

Q14
True / False

In MySQL, the BLOB data type is used to store binary large objects, such as images or files.

Q15
True / False

The ENUM data type in MySQL allows storing multiple values from a predefined list.

Q16
True / False

In MySQL, the FLOAT data type can store decimal numbers with higher precision than the DOUBLE data type.

Q17
True / False

The JSON data type in MySQL is used to store JSON-formatted strings.

Q18
True / False

In MySQL, the SET data type can store multiple values from a predefined list.

Q19
True / False

MySQL's BIT data type is used to store boolean values.

Q20
True / False

MySQL uses the CHAR data type for storing fixed-length strings.

Q21
Multiple Choice

Identify the correct data type for storing an IP address in MySQL.

SQL Code
CREATE TABLE users (
 user_id INT PRIMARY KEY,
 ip_address VARBINARY(16)
);
Q22
Multiple Choice

Select the correct data type to store a large text document.

SQL Code
CREATE TABLE documents (
 doc_id INT PRIMARY KEY,
 content LONGTEXT
);
Q23
Multiple Choice

Determine the correct data type for a column that stores the year only.

SQL Code
CREATE TABLE events (
 event_id INT PRIMARY KEY,
 event_year YEAR
);
Q24
Multiple Choice

Which data type should be used for a column storing precise monetary values?

SQL Code
CREATE TABLE transactions (
 transaction_id INT PRIMARY KEY,
 amount DECIMAL(10, 2)
);
Q25
Multiple Choice

Choose the correct data type for storing a phone number.

SQL Code
CREATE TABLE contacts (
 contact_id INT PRIMARY KEY,
 phone_number VARCHAR(15)
);
Q26
Multiple Choice

Identify the correct data type for storing binary data, such as images.

SQL Code
CREATE TABLE images (
 image_id INT PRIMARY KEY,
 image_data LONGBLOB
);
Q27
Multiple Choice

Select the correct data type for storing fixed-length strings.

SQL Code
CREATE TABLE products (
 product_id INT PRIMARY KEY,
 product_code CHAR(10)
);
Q28
Multiple Choice

Determine the correct data type for storing a timestamp with fractional seconds.

SQL Code
CREATE TABLE logs (
 log_id INT PRIMARY KEY,
 event_timestamp TIMESTAMP(6)
);
Q29
Multiple Choice

Choose the correct data type for a column that needs to store email addresses.

SQL Code
CREATE TABLE users (
 user_id INT PRIMARY KEY,
 email VARCHAR(255)
);
Q30
Multiple Choice

Identify the correct data type for storing precise geographic coordinates.

SQL Code
CREATE TABLE locations (
 location_id INT PRIMARY KEY,
 latitude DECIMAL(9, 6),
 longitude DECIMAL(9, 6)
);