“Right” is a strong word, but most people are likely to use it VARCHAR. CHARalso an option, but it is not so often used in my experience. This page explains the difference.
One of the notable differences between CHARand VARCHARin recent versions of MySQL is that CHARit cannot store trailing spaces (because the column is automatically filled to the maximum length with spaces). Therefore, if you store something like 'abc ', it will be restored as 'abc'. This may not matter for most applications, but you need to keep this in mind. Similarly, until 5.03, trailing spaces are removed from the fields VARCHARbefore insertion. Therefore, if you need to store arbitrary byte values and do not want to worry about different behaviors between versions of MySQL, you should use one of BLOB.
source
share