DEV Community

loading...

Discussion on: What data type should I use in mysql

Collapse
adityamitra profile image
Aditya Mitra

For email, I would suggest a varchar of 255. I think that would work for almost all domain names and usernames.

For addresses, I would again go for varchars but a shorter length.
Like for city it would be 100. Same for state. Country code can be 2 depending upon your setup.
And for Address line 1 and 2, you can go for varchar 255

For phone numbers, I would use BIGINT considering that you already have the country code. But, your phone number should be be in the range of BIGINT in this case.

Collapse
sosaheri profile image
Heriberto Sosa Author

Thanks Aditya