I just noticed in the documentation that in versions greater than 5.0.3 of MySQL you can declare varchar's with larger values than 255. In the past I've switched datatypes for anything larger than 255 but I'm wondering if it's better practice now to define larger string values using varchar(1000) or whatever length is appropriate.
Is this common with other databases now as well, or is it best to stick with 255 as the max value and change datatypes above that?
As the answer @Eric pointed out suggests, VARCHARs are stored in table while TEXTs are stored in a separate file - the only truly important point that you have to keep in mind when designing a table structure is the row size limitation (MySQL limits each row / record to 65 KB).
I suggest you use VARCHARs for "one-liners" - anything that has a text input as its data source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With