How can I have a max length of 4096 bytes for a MySQL text or blob column? Is this even possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, check this page:
http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
You can use maybe VARCHAR or VARBINARY instead of the TEXT or BLOB field. For VARHCHAR and VARBINARY you can specify a length of 4096 if you want. Example:
MYSTRING VARCHAR(4096);. But pay attention that, as the manual says:So if you use a lot of large columns, you must be sure to stay under the 64k limit for a row