This set of MySQL Multiple Choice Questions & Answers (MCQs) focuses on “MySQL Datatypes – 1”.
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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: None.
6. In oracle database variable length column is declared by ____________
a) Varchar
b) Varchar 3
c) Varchar2
d) None of the mentioned
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: None.
9. Which “text type” has the maximum number of bytes?
a) Tiny text
b) Text
c) Medium text
d) Long text
View Answer
Explanation: 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
View Answer
Explanation: None.
Sanfoundry Global Education & Learning Series – MySQL Database.
To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check MySQL Books
- Apply for Programming Internship
- Check Information Technology Books
- Practice Programming MCQs