php - Why does MySQL allow VARCHAR(255) to have larger numbers -
When I first learned about the field types in MySQL, I would define anything which no number as VARCHAR There was no and nothing to determine the length. 500 2000, but am I right that the maximum 255 is in fact?
If this is the case, then why does MySQL define the column with a very long length and what is it actually doing? Will it allow big length? Does this define column / area as something else?
Any advice welcomed.
This behavior was changed after 5.0.3:
The values in the VARCHAR column are variable-length strings. The length can be specified as 0 to 65,535 in 0 to 255 and 5.0.3 and above versions of MySQL 5.0.3. MySQL 5.0.3 contains the maximum effective length of VARCHAR and later the maximum line size (65,535 bytes, which is shared between all the columns) and the character set.
From the document context.
Comments
Post a Comment