steven steven - 1 month ago 8
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).

Comments