[NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE
collation_name]

A variable-length string. M represents the maximum column length in
characters. In MySQL 5.0, the range of M is 0 to 255 before MySQL
5.0.3, and 0 to 65,535 in MySQL 5.0.3 and later. The effective maximum
length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum
row size (65,535 bytes, which is shared among all columns) and the
character set used. For example, utf8 characters can require up to
three bytes per character, so a VARCHAR column that uses the utf8
character set can be declared to be a maximum of 21,844 characters. See
http://dev.mysql.com/doc/refman/5.0/en/column-count-limit.html.

MySQL stores VARCHAR values as a one-byte or two-byte length prefix
plus data. The length prefix indicates the number of bytes in the
value. A VARCHAR column uses one length byte if values require no more
than 255 bytes, two length bytes if values may require more than 255
bytes.

*Note*: Before 5.0.3, trailing spaces were removed when VARCHAR values
were stored, which differs from the standard SQL specification.

Prior to MySQL 5.0.3, a VARCHAR column with a length specification
greater than 255 is converted to the smallest TEXT type that can hold
values of the given length. For example, VARCHAR(500) is converted to
TEXT, and VARCHAR(200000) is converted to MEDIUMTEXT. However, this
conversion affects trailing-space removal.

VARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR is the
standard SQL way to define that a VARCHAR column should use some
predefined character set. MySQL 4.1 and up uses utf8 as this predefined
character set.
http://dev.mysql.com/doc/refman/5.0/en/charset-national.html. NVARCHAR
is shorthand for NATIONAL VARCHAR.

URL: http://dev.mysql.com/doc/refman/5.0/en/string-type-overview.html

