I want to store contents of email body into MySql. What would the correct type&size of the field be? Can varchar() provide enough storage size? Is there a limitation in the email body's length?
Thanks in advance.
So over the last few months, the average email address we saw was 21.9 characters long. If you want your form to accommodate 80% of the email addresses, you need to display 28 characters. And if you want 95% of your web visitors to be able to see what they typed, you need to show at least 31 characters.
a varchar(50 ) would be enough for storing email..
Just use varchar(max) as it will be the easiest option to keep all data in the database so you can migrate, replicate or whatever the database and everything will be kept intact.
you can use varchar as your data type for email column as emails are usually composed of letters, numbers and special characters. The right value of data length for the email field is database-agnostic. If you are also considering standard SQL types, the same can be said for data type, that is a string.
You will need to use blob or text types. There is no limit on the length of an email body.
"A BLOB is a binary large object that can hold a variable amount of data"
http://dev.mysql.com/doc/refman/5.5/en/blob.html
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