State list of world with country-code [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this questionWhere 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.
http://www.timdavis.com.au/data/
There is a link to a excel spreadsheet of all the country and state information.
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.
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
Search google for: php country abbreviations list
Here's the first link: http://27.org/isocountrylist/
http://www.timdavis.com.au/data/
Interesting data for Country & states. Download excel from here correct the state names and import into your database and use.
You can get the SQL Scripts from this post: SQL Scripts
精彩评论