250+ TOP MCQs on MySQL Datatypes and Answers

MySQL Multiple Choice Questions on “MySQL Datatypes”.

1. Character data can be stored as ______________
a) Fixed length string
b) Variable length string
c) Either Fixed or Variable length string
d) None of the mentioned

Answer: c
Clarification: To store character data we can use two definitions
Char(20) /*fixed length */
Varchar(20) /* variable length */

2. Which declaration represents that “character data will consume the same number of bytes as declared and is right padded”?
a) Char
b) Varchar
c) Both Char and Varchar
d) None of the mentioned

Answer: a
Clarification: None.

3. Which declaration doesn’t use the same number of bytes and consumption of bytes depends on the input data?
a) Varchar
b) Char
c) Both Varchar and Char
d) None of the mentioned

Answer: a
Clarification: None.

4. The maximum length of the char columns is ____________
a) 255 bytes
b) 65, 535 bytes
c) 256 bytes
d) None of the mentioned

Answer: a
Clarification: None.

5. The maximum length of the varchar columns is ____________
a) Upto 65, 535 bytes
b) Upto 256 bytes
c) Upto 65, 567 bytes
d) None of the mentioned

Answer: a
Clarification: None.

6. In oracle database variable length column is declared by ____________
a) Varchar
b) Varchar 3
c) Varchar2
d) None of the mentioned

Answer: c
Clarification: None.

7. Mysql support different character sets, which command is used to display all character sets?
a) SHOW CHARACTER SET;
b) SHOW;
c) CHARACTER SET;
d) None of the mentioned

Answer: a
Clarification: None.

8. Which one is the correct declaration for choosing the character set other than default?
a) Varchar(20) character set utf8;
b) Varchar(20);
c) Varchar(20) character set;
d) None of the mentioned

  250+ TOP MCQs on Triggers and Answers

Answer: a
Clarification: None.

9. Which “text type” has the maximum number of bytes?
a) Tiny text
b) Text
c) Medium text
d) Long text

Answer: d
Clarification: Long text store 4, 294, 967, 295.

10. Which among the following have the maximum bytes?
a) Varchar
b) Char
c) Text type
d) Both Varchar and Char

Answer: c

Leave a Comment

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

Scroll to Top