MySQL VARCHAR size limit
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? If you set a column to be varchar(15) the maximum bytes allowed is 15. Thus you can't pass it more than 15 characters without modifying the column to support more than 15. If you store a 4 character string it should only use around 4 bytes out of a possible 15, whereas if you