MCQ

MYSQL MCQ and Answers – Part 4

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. What is the default format for the data type “Date”?

A YYYY-MM-DD

B MM-YYYY-DD

C DD-MM-YYYY

D None of the above

A

 

 

2. The place where the server stores its databases and status files is called “data”?

A True

B False

A
The MySQL “data” directory located in ‘C:\Program Files\EasyPHP\mysql\data’ is the location where the server stores its databases and status files. It is crucial to understand all the structures and contents of the data repository.

 

 

3. The maximum value for FLOAT is ___________?

A 3.402823466E+38

B 3.402823466E+37

C 3.402823466E+39

D 3.402823466E+35

A
In MySQL, each data type has its own range. The maximum value for FLOAT is 3.402823466E + 38.

 

[st_adsense]  

4. Which of the following value displays an error when stored in “float(4,2)”?

A 12.11

B 13.1

C 1.12

D 123.44

D
Float(4,2) cannot store more than 4 digits.

 

 

5. Are “Datetime” and “Timestamp” the same data type?

A Yes

B No

C Depends on DBMS

D None of the above

D
“Timestamp” column will be automatically filled with the current date/time by Mysql server, when a row is modified.

 

 

6. What is the default format for the data type “Time”?

A HHH:MI:SS

B SS:MI:HHH

C MI:SS:HHH

D None of the above

A
The default format for the data type “Time” is: HHH: MI: SS

 

 

7. What is the default format for the data type “Year”?

A YYYY

B YYYY-DD-MM

C MM-YYYY-DD

D None of the above

A
The default format for the data type “Year” is YYYY.

 

[st_adsense]  

8. Which of the following is the correct representation of “float(5,0)”?

A 12345.123

B 12345.1

C 12345

D 123.123

C
Float(5,0) indicates that there should be a total of five digits, in which no digit should be placed to the right of the decimal point.

 

 

9. Which of the following is the correct representation of “float(4,2)”?

A 24,33

B 124,4

C 12.123

D 24.33 et 124

D
Float(4,2) allows at most 2 digits to the right/left of the decimal.

 

 

10. The size of the BIT type is _____ ?

A 1

B 2

C 3

D Variable

D
BIT data type stores bit values within range of 1-64.

 

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

Leave a Reply

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