1. Home
  2. Computer Science MCQs
  3. MySQL
  4. What is the key difference between CHAR and VARCHAR in…

Added 2 Nov 2026

What is the key difference between CHAR and VARCHAR in MySQL?

  1. CHAR allows NULL; VARCHAR does not allow NULL
  2. CHAR is for Unicode; VARCHAR is ASCII only
  3. CHAR stores numbers; VARCHAR stores text
  4. CHAR is fixed-length; VARCHAR is variable-length Correct answer

Correct answer

D. CHAR is fixed-length; VARCHAR is variable-length

21 views

MCQSEXAM

Explanation

CHAR(n) always uses n characters, padding with spaces, which suits fixed codes such as country codes. VARCHAR(n) stores only the actual length plus a small prefix.

Reference

Asked in: NTS, Technical Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More MySQL MCQs

Practise all MySQL MCQs

Similar MCQs