MySQL VARCHAR size limit

Viewed 68628

If I have a column in table with field of type VARCHAR(15) and if I try to insert data of length 16, MySQL gives an error stating

Data too long for column 'testname' at row 1

Does anyone know why VARCHAR fields in MySQL take fixed length? Also how many bytes does a VARCHAR field take per record based on the size given?

4 Answers
Related