doubledee — 2011-12-23T21:14:58-05:00 — #1
How big should I make my E-mail field?
Right now I have 40 characters, but maybe that is too small??
felgall — 2011-12-23T21:20:01-05:00 — #2
An email address is allowed to have up to 255 characters before the @ and up to 63 characters after so the absolute maximum length it can have is 319. I generally use a varchar (255) to hold email addresses as that only uses as much space as the address actually needs and I have never come across an email address longer than that.
The only difference between a char(40) and varchar(255) is that email addresses longer than 40 will not fit into the first of these - a smaller email address will take up the same amount of space in both since the char(40) will almost certainly be converted by the database itself into a varchar so as to save space.