A list of world’s countries available as an MySQL file containing the official short names in English as specified by ISO 3166-1, the ISO 3166-1-alpha-2 code provided by the International Organization for Standardization and the ISO alpha-3 code provided by the United Nations Statistics Division.
The package also contains the national flags of each country as a 16x16, 24x24, 32x32, 64x64 and 128x128 PNG images, courtesy of IconDrawer. The image files are named using the ISO 3166-1-alpha-2 code of the country they represent, for easily pairing flags with countries.
Keep in mind that while all the countries have ISO 3166-1-alpha-2 code, not all the countries have an ISO 3-alpha code.
Import countries.sql
into your MySQL database. Once imported, you'll see a table called countries
which you can query like
SELECT * FROM countries WHERE name = "Saint Helena, Ascension and Tristan Da Cunha"
or
SELECT * FROM countries WHERE alpha_2 = "sh"
Please note that when importing
countries.sql
if your database already contains a table named "countries", it will be deleted!
You can help by making the list compatible with other database systems or by suggesting other features that could fit in this package.