Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

State list of world with country-code [closed]

Where can I found the list of all the states of world with their country code (ISO2 or ISO3).

I have to insert all these states in my database. If the list is available in the .sql will be great.

I need state list of world with country-code not the country list.

Do you know where can I found?

Thanks in Advance.

like image 918
Daric Avatar asked Jun 02 '11 11:06

Daric


People also ask

Which country has no country code?

Country Code NO Country code according to ISO-3166 Alpha-2 NO is the two-letter country abbreviation for Norway.

Are there 256 countries in the world?

There are 195 countries in the world today. This total comprises 193 countries that are member states of the United Nations and 2 countries that are non-member observer states: the Holy See and the State of Palestine.

Which country is No 7 in the world?

Russia Country Code 7 Country Code RU.

What is the 42 country?

Following the break-up of Czechoslovakia in 1993, the successor states, the Czech Republic and Slovakia, continued to share the 42 country code until 28 February 1997, with the Czech Republic then adopting 420 and Slovakia adopting 421.


3 Answers

http://www.timdavis.com.au/data/

There is a link to a excel spreadsheet of all the country and state information.

like image 68
Payload Avatar answered Nov 13 '22 04:11

Payload


Wikipedia has the full list of both 2-letter and 3-letter country codes:

http://en.wikipedia.org/wiki/ISO_3166-1

With regards to having it in a local DB table, note that this list does occasionally change as nations are created, renamed or merged, so although it's not very frequent, you do need to keep it up-to-date, and also importantly, know what you're going to do with codes which become obsolete (ie if you've got cross-references to it from other tables, you can't just delete a record without making the cross-references invalid)

[EDIT]

You comment that you're looking for a state list.

This phrase "state list" is confusing. Are you using the word "state" as its used in the US. Other countries would refer to those as provinces, regions, counties, cantons, or a range of other terms.

More importantly, very few countries have codes for their individual regions.

For example, the UK is broken into counties such as Yorkshire, Hampshire and Surrey, but there aren't any codes that map to these names. There are short abbreviated versions of some of the names (ie 'Hants'=='Hampshire'), but they're colloquial abbreviations; certainly not official. There are also UK postcodes which do provide codes for areas, but these do not map to named counties. And other countries don't even have that.

like image 28
Spudley Avatar answered Nov 13 '22 03:11

Spudley


This has annoyed me too. My issue is I can never find states to match countries. I created this for people to use. Its in YAML format, I generated python and javascript versions. I also generated an alternate array.

https://github.com/niall-oc/minimax

like image 3
nialloc Avatar answered Nov 13 '22 03:11

nialloc