steven steven - 5 months ago 39
SQL Question

What's the difference between VARCHAR and CHAR?

What's the difference between VARCHAR and CHAR in MySQL?

I am trying to store MD5 hashes.

Answer

VARCHAR is variable-length.

CHAR is fixed length.

If your content is a fixed size, you'll get better performance with CHAR.

See the MySQL page on CHAR and VARCHAR Types for a detailed explaination (be sure to also read the comments).