When choosing “TEXT” as a type for a field in SQL, what should the length/values be? I have always skipped that field but just thought it might be an unsafe thing…
Am I right or do i need to set it to a certain number?
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.
TEXT columns can have arbitrary length (for practical purposes, the length of a TEXT field is limited by available memory and buffers).
There is nothing inherently “unsafe” about TEXT columns. There are however a couple of caveats to be aware of, like MySQL only using the first 1024 bytes for sorting.
You can read more about all this on the the official MySQL documentation