Type and size of columns for international units (states, provinces, territories, etc.)

I apologize if this is a duplication.

What standard column standardization would you use to store data from an international division of a country?

For example, if it were only the USA and Canada, I believe that all units have an abbreviation with 2 characters ... which can provide Char (2)

This cannot be sustainable internationally, so that we do not assume that there are only 1296 (AZ, 0-9) units.

I was unable to find an ISO list or even specify how to store them.

This is great, I don’t need to know them all now, but I would like to know what is the standard and what standard information to store as needed.

thanks

EDIT: It seems that I can accomplish this using the ISO 3166-2 standard: http://en.wikipedia.org/wiki/ISO_3166-2

Available as a dataset: http://www.commondatahub.com/live/geography/state_province_region/iso_3166_2_state_codes

+4
source share
2 answers

As far as I know, there are no international standards, because this is a national issue

Take the UK ...

  • Are the units Wales, Scotland, England, Northern Ireland? No abbreviations.
  • Counties: this is “Cheshire” (“Ches.”) Or “Highlands and Islands” (without abbreviations).
  • Postal areas: Rutland is still a postal district, but not an official one.

Your question may suggest a federal structure (according to Switzerland, where am I), but this does not apply to many, if most countries. When traveling with Switzerland, Canton does not have postal addresses or postal codes.

If there is an ISO standard, then national or local pride will annoy players as soon as it is on your website.

Personally, I don’t like going through the “state” drop-down list on the website. It does not matter to me either in the UK (my citizen), or in my residence (Switzerland).

You might be better off sticking with states from the US and Canada and non-US / Canada. Do not press or accept the unit.

Edit, Jun 2012.

Now I live in Malta. I have no state, no county, no Canton. Please do not insist.

In any major cities in the UK, the county (England + Wales) / region (Scotland) is not usually mentioned.

+5
source

Juat, for example:

Llanfairpwllgwyngyllgogerychwyrndrobwyll-llantysiliogogogoch This is the name of a city in North Wales.

VARCHAR(100) 

Abbreviations: There is a 2-letter country code and a three-letter country code used by the UN. You can use VARCHAR (2) for a two-letter code and VARCHAR (3) for a three-letter country code.

eg. Australia 2-letter, 3-letter, and numeric code

 AU AUS 036 Australia 

It all depends on how you want to save the data. If you want to save the 3-letter + numeric code in one column, then the size will fit that, and if you want to save them separately, then the size will be different.

To be safe, you can use VARCHAR (10).

+1
source

All Articles