All Countries MySQL Database Table

Here's a list of the world's countries in an easy-to-import MySQL data dump.

The abv column contains ISO 3661-1 alpha-2 codes, abv3 contains ISO 3661-1 alpha-3 codes, and code contains ISO 3661-1 numeric codes.

1.   CREATE TABLE `geo_countries` (
2.     `defunct` char(1) DEFAULT NULL,
3.     `name` varchar(100) NOT NULL,
4.     `abv` char(2) NOT NULL COMMENT 'ISO 3661-1 alpha-2',
5.     `abv3` char(3) NOT NULL COMMENT 'ISO 3661-1 alpha-3',
6.     `code` char(3) NOT NULL COMMENT 'ISO 3661-1 numeric',
7.     `slug` varchar(100) NOT NULL,
8.     PRIMARY KEY (`abv`),
9.     UNIQUE KEY `slug` (`slug`)
10.  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
11.  
12.  INSERT INTO `geo_countries` (`defunct`,`name`,`abv`,`abv3`,`code`,`slug`) VALUES 
13.  ('','Afghanistan','AF','AFG',4,'afghanistan'),
14.  ('','Aland Islands','AX','ALA',248,'aland-islands'),
15.  ('','Albania','AL','ALB',8,'albania'),
16.  ('','Algeria','DZ','DZA',12,'algeria'),
17.  ('','American Samoa','AS','ASM',16,'american-samoa'),
18.  ('','Andorra','AD','AND',20,'andorra'),
19.  ('','Angola','AO','AGO',24,'angola'),
20.  ('','Anguilla','AI','AIA',660,'anguilla'),
21.  ('','Antigua and Barbuda','AG','ATG',28,'antigua-and-barbuda'),
22.  ('','Argentina','AR','ARG',32,'argentina'),
23.  ('','Armenia','AM','ARM',51,'armenia'),
24.  ('','Aruba','AW','ABW',533,'aruba'),
25.  ('','Australia','AU','AUS',36,'australia'),
26.  ('','Austria','AT','AUT',40,'austria'),
27.  ('','Azerbaijan','AZ','AZE',31,'azerbaijan'),
28.  ('','Bahamas','BS','BHS',44,'bahamas'),
29.  ('','Bahrain','BH','BHR',48,'bahrain'),
30.  ('','Bangladesh','BD','BGD',50,'bangladesh'),
31.  ('','Barbados','BB','BRB',52,'barbados'),
32.  ('','Belarus','BY','BLR',112,'belarus'),
33.  ('','Belgium','BE','BEL',56,'belgium'),
34.  ('','Belize','BZ','BLZ',84,'belize'),
35.  ('','Benin','BJ','BEN',204,'benin'),
36.  ('','Bermuda','BM','BMU',60,'bermuda'),
37.  ('','Bhutan','BT','BTN',64,'bhutan'),
38.  ('','Bolivia','BO','BOL',68,'bolivia'),
39.  ('','Bosnia and Herzegovina','BA','BIH',70,'bosnia-and-herzegovina'),
40.  ('','Botswana','BW','BWA',72,'botswana'),
41.  ('','Brazil','BR','BRA',76,'brazil'),
42.  ('','British Virgin Islands','VG','VGB',92,'british-virgin-islands'),
43.  ('','Brunei Darussalam','BN','BRN',96,'brunei-darussalam'),
44.  ('','Bulgaria','BG','BGR',100,'bulgaria'),
45.  ('','Burkina Faso','BF','BFA',854,'burkina-faso'),
46.  ('','Burundi','BI','BDI',108,'burundi'),
47.  ('','Cambodia','KH','KHM',116,'cambodia'),
48.  ('','Cameroon','CM','CMR',120,'cameroon'),
49.  ('','Canada','CA','CAN',124,'canada'),
50.  ('','Cape Verde','CV','CPV',132,'cape-verde'),
51.  ('','Cayman Islands','KY','CYM',136,'cayman-islands'),
52.  ('','Central African Republic','CF','CAF',140,'central-african-republic'),
53.  ('','Chad','TD','TCD',148,'chad'),
54.  ('','Chile','CL','CHL',152,'chile'),
55.  ('','China','CN','CHN',156,'china'),
56.  ('','Hong Kong','HK','HKG',344,'hong-kong'),
57.  ('','Macao','MO','MAC',446,'macao'),
58.  ('','Colombia','CO','COL',170,'colombia'),
59.  ('','Comoros','KM','COM',174,'comoros'),
60.  ('','Congo','CG','COG',178,'congo'),
61.  ('','Democratic Republic of the Congo','CD','COD',180,'democratic-republic-of-congo'),
62.  ('','Cook Islands','CK','COK',184,'cook-islands'),
63.  ('','Costa Rica','CR','CRI',188,'costa-rica'),
64.  ('','Cote d\'Ivoire','CI','CIV',384,'cote-divoire'),
65.  ('','Croatia','HR','HRV',191,'croatia'),
66.  ('','Cuba','CU','CUB',192,'cuba'),
67.  ('','Cyprus','CY','CYP',196,'cyprus'),
68.  ('','Czech Republic','CZ','CZE',203,'czech-republic'),
69.  ('','North Korea','KP','PRK',408,'north-korea'),
70.  ('','Denmark','DK','DNK',208,'denmark'),
71.  ('','Djibouti','DJ','DJI',262,'djibouti'),
72.  ('','Dominica','DM','DMA',212,'dominica'),
73.  ('','Dominican Republic','DO','DOM',214,'dominican-republic'),
74.  ('','Ecuador','EC','ECU',218,'ecuador'),
75.  ('','Egypt','EG','EGY',818,'egypt'),
76.  ('','El Salvador','SV','SLV',222,'el-salvador'),
77.  ('','Equatorial Guinea','GQ','GNQ',226,'equatorial-guinea'),
78.  ('','Eritrea','ER','ERI',232,'eritrea'),
79.  ('','Estonia','EE','EST',233,'estonia'),
80.  ('','Ethiopia','ET','ETH',231,'ethiopia'),
81.  ('','Faeroe Islands','FO','FRO',234,'faeroe-islands'),
82.  ('','Falkland Islands','FK','FLK',238,'falkland-islands'),
83.  ('','Fiji','FJ','FJI',242,'fiji'),
84.  ('','Finland','FI','FIN',246,'finland'),
85.  ('','France','FR','FRA',250,'france'),
86.  ('','French Guiana','GF','GUF',254,'french-guiana'),
87.  ('','French Polynesia','PF','PYF',258,'french-polynesia'),
88.  ('','Gabon','GA','GAB',266,'gabon'),
89.  ('','Gambia','GM','GMB',270,'gambia'),
90.  ('','Georgia','GE','GEO',268,'georgia'),
91.  ('','Germany','DE','DEU',276,'germany'),
92.  ('','Ghana','GH','GHA',288,'ghana'),
93.  ('','Gibraltar','GI','GIB',292,'gibraltar'),
94.  ('','Greece','GR','GRC',300,'greece'),
95.  ('','Greenland','GL','GRL',304,'greenland'),
96.  ('','Grenada','GD','GRD',308,'grenada'),
97.  ('','Guadeloupe','GP','GLP',312,'guadeloupe'),
98.  ('','Guam','GU','GUM',316,'guam'),
99.  ('','Guatemala','GT','GTM',320,'guatemala'),
100. ('','Guernsey','GG','GGY',831,'guernsey'),
101. ('','Guinea','GN','GIN',324,'guinea'),
102. ('','Guinea-Bissau','GW','GNB',624,'guinea-bissau'),
103. ('','Guyana','GY','GUY',328,'guyana'),
104. ('','Haiti','HT','HTI',332,'haiti'),
105. ('','Holy See','VA','VAT',336,'holy-see'),
106. ('','Honduras','HN','HND',340,'honduras'),
107. ('','Hungary','HU','HUN',348,'hungary'),
108. ('','Iceland','IS','ISL',352,'iceland'),
109. ('','India','IN','IND',356,'india'),
110. ('','Indonesia','ID','IDN',360,'indonesia'),
111. ('','Iran','IR','IRN',364,'iran'),
112. ('','Iraq','IQ','IRQ',368,'iraq'),
113. ('','Ireland','IE','IRL',372,'ireland'),
114. ('','Isle of Man','IM','IMN',833,'isle-of-man'),
115. ('','Israel','IL','ISR',376,'israel'),
116. ('','Italy','IT','ITA',380,'italy'),
117. ('','Jamaica','JM','JAM',388,'jamaica'),
118. ('','Japan','JP','JPN',392,'japan'),
119. ('','Jersey','JE','JEY',832,'jersey'),
120. ('','Jordan','JO','JOR',400,'jordan'),
121. ('','Kazakhstan','KZ','KAZ',398,'kazakhstan'),
122. ('','Kenya','KE','KEN',404,'kenya'),
123. ('','Kiribati','KI','KIR',296,'kiribati'),
124. ('','Kuwait','KW','KWT',414,'kuwait'),
125. ('','Kyrgyzstan','KG','KGZ',417,'kyrgyzstan'),
126. ('','Laos','LA','LAO',418,'laos'),
127. ('','Latvia','LV','LVA',428,'latvia'),
128. ('','Lebanon','LB','LBN',422,'lebanon'),
129. ('','Lesotho','LS','LSO',426,'lesotho'),
130. ('','Liberia','LR','LBR',430,'liberia'),
131. ('','Libyan Arab Jamahiriya','LY','LBY',434,'libyan-arab-jamahiriya'),
132. ('','Liechtenstein','LI','LIE',438,'liechtenstein'),
133. ('','Lithuania','LT','LTU',440,'lithuania'),
134. ('','Luxembourg','LU','LUX',442,'luxembourg'),
135. ('','Madagascar','MG','MDG',450,'madagascar'),
136. ('','Malawi','MW','MWI',454,'malawi'),
137. ('','Malaysia','MY','MYS',458,'malaysia'),
138. ('','Maldives','MV','MDV',462,'maldives'),
139. ('','Mali','ML','MLI',466,'mali'),
140. ('','Malta','MT','MLT',470,'malta'),
141. ('','Marshall Islands','MH','MHL',584,'marshall-islands'),
142. ('','Martinique','MQ','MTQ',474,'martinique'),
143. ('','Mauritania','MR','MRT',478,'mauritania'),
144. ('','Mauritius','MU','MUS',480,'mauritius'),
145. ('','Mayotte','YT','MYT',175,'mayotte'),
146. ('','Mexico','MX','MEX',484,'mexico'),
147. ('','Micronesia','FM','FSM',583,'micronesia'),
148. ('','Monaco','MC','MCO',492,'monaco'),
149. ('','Mongolia','MN','MNG',496,'mongolia'),
150. ('','Montenegro','ME','MNE',499,'montenegro'),
151. ('','Montserrat','MS','MSR',500,'montserrat'),
152. ('','Morocco','MA','MAR',504,'morocco'),
153. ('','Mozambique','MZ','MOZ',508,'mozambique'),
154. ('','Myanmar','MM','MMR',104,'myanmar'),
155. ('','Namibia','NA','NAM',516,'namibia'),
156. ('','Nauru','NR','NRU',520,'nauru'),
157. ('','Nepal','NP','NPL',524,'nepal'),
158. ('','Netherlands','NL','NLD',528,'netherlands'),
159. ('','Netherlands Antilles','AN','ANT',530,'netherlands-antilles'),
160. ('','New Caledonia','NC','NCL',540,'new-caledonia'),
161. ('','New Zealand','NZ','NZL',554,'new-zealand'),
162. ('','Nicaragua','NI','NIC',558,'nicaragua'),
163. ('','Niger','NE','NER',562,'niger'),
164. ('','Nigeria','NG','NGA',566,'nigeria'),
165. ('','Niue','NU','NIU',570,'niue'),
166. ('','Norfolk Island','NF','NFK',574,'norfolk-island'),
167. ('','Northern Mariana Islands','MP','MNP',580,'northern-mariana-islands'),
168. ('','Norway','NO','NOR',578,'norway'),
169. ('','Palestine','PS','PSE',275,'palestine'),
170. ('','Oman','OM','OMN',512,'oman'),
171. ('','Pakistan','PK','PAK',586,'pakistan'),
172. ('','Palau','PW','PLW',585,'palau'),
173. ('','Panama','PA','PAN',591,'panama'),
174. ('','Papua New Guinea','PG','PNG',598,'papua-new-guinea'),
175. ('','Paraguay','PY','PRY',600,'paraguay'),
176. ('','Peru','PE','PER',604,'peru'),
177. ('','Philippines','PH','PHL',608,'philippines'),
178. ('','Pitcairn','PN','PCN',612,'pitcairn'),
179. ('','Poland','PL','POL',616,'poland'),
180. ('','Portugal','PT','PRT',620,'portugal'),
181. ('','Puerto Rico','PR','PRI',630,'puerto-rico'),
182. ('','Qatar','QA','QAT',634,'qatar'),
183. ('','South Korea','KR','KOR',410,'south-korea'),
184. ('','Moldova','MD','MDA',498,'moldova'),
185. ('','Reunion','RE','REU',638,'reunion'),
186. ('','Romania','RO','ROU',642,'romania'),
187. ('','Russian Federation','RU','RUS',643,'russian-federation'),
188. ('','Rwanda','RW','RWA',646,'rwanda'),
189. ('','Saint-Barthelemy','BL','BLM',652,'saint-barthelemy'),
190. ('','Saint Helena','SH','SHN',654,'saint-helena'),
191. ('','Saint Kitts and Nevis','KN','KNA',659,'saint-kitts-and-nevis'),
192. ('','Saint Lucia','LC','LCA',662,'saint-lucia'),
193. ('','Saint-Martin','MF','MAF',663,'saint-martin'),
194. ('','Saint Pierre and Miquelon','PM','SPM',666,'saint-pierre-and-miquelon'),
195. ('','Saint Vincent and the Grenadines','VC','VCT',670,'saint-vincent-and-grenadines'),
196. ('','Samoa','WS','WSM',882,'samoa'),
197. ('','San Marino','SM','SMR',674,'san-marino'),
198. ('','Sao Tome and Principe','ST','STP',678,'sao-tome-and-principe'),
199. ('','Saudi Arabia','SA','SAU',682,'saudi-arabia'),
200. ('','Senegal','SN','SEN',686,'senegal'),
201. ('','Serbia','RS','SRB',688,'serbia'),
202. ('','Seychelles','SC','SYC',690,'seychelles'),
203. ('','Sierra Leone','SL','SLE',694,'sierra-leone'),
204. ('','Singapore','SG','SGP',702,'singapore'),
205. ('','Slovakia','SK','SVK',703,'slovakia'),
206. ('','Slovenia','SI','SVN',705,'slovenia'),
207. ('','Solomon Islands','SB','SLB',90,'solomon-islands'),
208. ('','Somalia','SO','SOM',706,'somalia'),
209. ('','South Africa','ZA','ZAF',710,'south-africa'),
210. ('','Spain','ES','ESP',724,'spain'),
211. ('','Sri Lanka','LK','LKA',144,'sri-lanka'),
212. ('','Sudan','SD','SDN',729,'sudan'),
213. ('','Suriname','SR','SUR',740,'suriname'),
214. ('','Svalbard and Jan Mayen Islands','SJ','SJM',744,'svalbard-and-jan-mayen-islands'),
215. ('','Swaziland','SZ','SWZ',748,'swaziland'),
216. ('','Sweden','SE','SWE',752,'sweden'),
217. ('','Switzerland','CH','CHE',756,'switzerland'),
218. ('','Syrian Arab Republic','SY','SYR',760,'syrian-arab-republic'),
219. ('','Tajikistan','TJ','TJK',762,'tajikistan'),
220. ('','Thailand','TH','THA',764,'thailand'),
221. ('','Macedonia','MK','MKD',807,'macedonia'),
222. ('','Timor-Leste','TP','TLS',626,'timor-leste'),
223. ('','Togo','TG','TGO',768,'togo'),
224. ('','Tokelau','TK','TKL',772,'tokelau'),
225. ('','Tonga','TO','TON',776,'tonga'),
226. ('','Trinidad and Tobago','TT','TTO',780,'trinidad-and-tobago'),
227. ('','Tunisia','TN','TUN',788,'tunisia'),
228. ('','Turkey','TR','TUR',792,'turkey'),
229. ('','Turkmenistan','TM','TKM',795,'turkmenistan'),
230. ('','Turks and Caicos Islands','TC','TCA',796,'turks-and-caicos-islands'),
231. ('','Tuvalu','TV','TUV',798,'tuvalu'),
232. ('','Uganda','UG','UGA',800,'uganda'),
233. ('','Ukraine','UA','UKR',804,'ukraine'),
234. ('','United Arab Emirates','AE','ARE',784,'united-arab-emirates'),
235. ('','United Kingdom','UK','GBR',826,'united-kingdom'),
236. ('','Tanzania','TZ','TZA',834,'tanzania'),
237. ('','United States','US','USA',840,'united-states'),
238. ('','U.S. Virgin Islands','VI','VIR',850,'us-virgin-islands'),
239. ('','Uruguay','UY','URY',858,'uruguay'),
240. ('','Uzbekistan','UZ','UZB',860,'uzbekistan'),
241. ('','Vanuatu','VU','VUT',548,'vanuatu'),
242. ('','Venezuela','VE','VEN',862,'venezuela'),
243. ('','Viet Nam','VN','VNM',704,'viet-nam'),
244. ('','Wallis and Futuna Islands','WF','WLF',876,'wallis-and-futuna-islands'),
245. ('','Western Sahara','EH','ESH',732,'western-sahara'),
246. ('','Yemen','YE','YEM',887,'yemen'),
247. ('','Zambia','ZM','ZMB',894,'zambia'),
248. ('','Zimbabwe','ZW','ZWE',716,'zimbabwe'),
249. ('','South Sudan','SS','SSD',728,'south-sudan');

This data can also be found in our combined countries, states, provinces, and oceans MySQL dump, along with our U.S. states MySQL data and our Canadian provinces MySQL data. To convert these abbreviations into the full country names, try our country abbreviation to name function.


Comments

Loading…

This post was first published on September 22nd, 2014 and last updated on November 1st, 2014 by Robert James Reese in the following categories: Data Dumps and MySQL. Before using any of the code or other content in this post, you must read and agree to our terms of use.