Maximum String Length for Common Database Fields

When designing a database schema you often have to make decisions on a fields length. Rather then just guess at a number, use the maximum possible value that could conceivably be used for the field. Below is a chart of common database fields such as email address, city, zip code and country name and the maximum possible length value that can be used.

Field Name Character Length Example
email address 254 see RFC5321
city 189 Longest City Name is Bangkok in Thai: Krung Thep Mahanakhon Amon Rattanakosin Mahinthara Ayuthaya Mahadilok Phop Noppharat Ratchathani Burirom Udomratchaniwet Mahasathan Amon Piman Awatan Sathit Sakkathattiya Witsanukam Prasit
zip code 18 Country with the longest zip code format is Chile with NNNNNNN, NNN-NNNN
country 90 Longest country name is Libya’s Arabic name prior to 2013: al-Jam-h-riyyah al-‘Arabiyyah al-L?biyyah ash-Sha‘biyyah al-Ishtir-kiyyah al-‘U-má

Our Products

Keyword level attribution for Apple Search Ads. Optimize your bids and increase your revenue. Sign up for free at

White Noise and Deep Sleep Sounds
Calming and relaxing sounds that will help you sleep like a baby tonight.
Download for free from the App Store.
Get it on Google Play.