MCQ

MYSQL MCQ and Answers – Part 3

MYSQL MCQs questions with answers to prepare for exams, tests, and certifications. These questions are taken from a real written exam and some parts are taken from an interview. So you will find questions on MySQL Database, SQL query, Data Model, and more. This MCQ will easily prepare anyone to pass their exam.
 

1. Which of the following statements is correct for choosing the non-default character set?

A Varchar(20) character set utf8;

B Varchar(20);

C Varchar(20) character set;

D None of the above

A
The keyword “set” is used to change the default character set.

 

 

2. Which of the following TEXT type has the maximum number of bytes?

A Tiny text

B Text

C Medium text

D Long text

D
Long text store : 4,294,967,295 characters – 4 Go.

 

 

3. Which of the following has the maximum number of bytes?

A Varchar

B Char

C Text

D Both Varchar and Char

C
TEXT has a fixed maximum size of 2¹⁶-1 = 65535 characters.

 

 

4. Which statement makes changes to database attributes?

A CHANGE

B ALTER

C ALTERNATE

D UPDATE

B
The statement ALTER TABLE is used to make changes to the attributes of a database

 

 

5. What happen if the data stored in a column of type Text exceeds the maximum size of that type?

A Extra memory will be allocated

B End the process

C Data will be truncated

D Depends on the system

C
Mysql cannot allocate dynamic memory so if the data exceeds memory, the extra data will be truncated.

 

 

6. Which data type is best suited for storing “small texts” in Mysql?

A Char

B Varchar

C Mediumtext

D Longtext

C
Mediumtext is the suitable data type for storing “small texts”.

 

 

7. Which data type is best suited for storing “documents” in Mysql?

A Char

B Varchar

C Mediumtext

D Longtext

D
Longtext has the largest range.

 

 

8. Numeric types are used to describe ________?

A Integers numbers

B Natural numbers

C Rational numbers

D Integers and natural numbers

D
Numeric types are used to describe integers and natural numbers.

 

 

9. Which numeric type has the largest range?

A Mediumint

B Smallint

C Int

D Tinyint

C
RANGES OF INTEGER TYPES

INT
Unsigned range 0 – 4294967295
Signed range -2147483648 – 2147483647
Storage space 4 bytes

 

TINYINT
Unsigned range 0 – 255
Signed range -128 – 127
Storage space 1 byte

 

SMALLINT
Unsigned range 0 – 65535
Signed range -32768 – 32767
Storage space 2 bytes

 

MEDIUMINT
Unsigned range 0 – 16777215
Signed range -8388608 – 8388607
Storage space 3 bytes

 

 

10. What will be the storage form for “float(4,2)” in Mysql?

A Total of four digits, two to the left of the decimal and two to the right of the decimal

B Total of six digits

C Total of four digits, not evenly distributed

D None of the above

A
According to standards.

 

mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

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