MySQL Questions and Answers – MySQL Datatypes – 1

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

Answer: c
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

Answer: a
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

Answer: a
Explanation: None.
advertisement
advertisement

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

Answer: a
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

Answer: a
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

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

Answer: c
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

Answer: a
Explanation: None.
advertisement

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

Answer: a
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

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

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

Answer: c
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.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.