KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: Are there disadvantages to using a generic varchar(255) for all text-based fields? In MYSQL you can choose a length for the VARCHAR field type. Possible values are 1-255. But what are its advantages if you use VARCHAR(255) that is the maximum instead of VARCHAR(20)? As far as I know, the size of the entries depends only on the real length of the inserted string. size (bytes) = length+1 So if you have the word "Example" in a VARCHAR(255) field, it would have 8 bytes. If you have it in a VARCHAR(20) field, it would have 8 bytes, too. What is the difference? I hope you can help me. Thanks in advance!
Tags (comma-separated)
Save Edits
Cancel