Skip to main content

Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions. 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.

So, we could easily change field's length to be longer than 255 characters if (and only if!) MySQL we work with is version 5.0.3+:

1) Login to phpMyAdmin and go to a database

2) Select table which field's length you want to change in the sidebar

3) Click Structure in the top menu

4) Click Change in Action column for field which varchar length you want to change

5) Set field Length/Values to desired value

6) Save the changes

Your table's varchar field now can support much longer strings.

- Advertisement -
- Advertisement -