Base de datos de Paises del Mundo en SQL


Hola que tal a todos, en este articulo les traigo una base de datos de países en SQL lista para que la agreguen a sus proyectos.

Muchas veces tenemos que desarrollar proyectos donde hay que tener la lista de países y a veces tenemos que optar por hacer un CRUD o conseguir la lista de países.

En el caso de países es mejor tener una base de datos de los países y no un CRUD ya que la lista de países no cambia, incluso hay proyectos en los que podemos usar solo determinados países.

A continuación el listado de países en SQL.

create database yourappname;
use yourappname; 

CREATE TABLE country (
id int not null auto_increment primary key,
short_name varchar(2),
name varchar(80)
);

INSERT INTO country (short_name, name) VALUES('AF', 'Afganistán');
INSERT INTO country (short_name, name) VALUES('AX', 'Islas Gland');
INSERT INTO country (short_name, name) VALUES('AL', 'Albania');
INSERT INTO country (short_name, name) VALUES('DE', 'Alemania');
INSERT INTO country (short_name, name) VALUES('AD', 'Andorra');
INSERT INTO country (short_name, name) VALUES('AO', 'Angola');
INSERT INTO country (short_name, name) VALUES('AI', 'Anguilla');
INSERT INTO country (short_name, name) VALUES('AQ', 'Antártida');
INSERT INTO country (short_name, name) VALUES('AG', 'Antigua y Barbuda');
INSERT INTO country (short_name, name) VALUES('AN', 'Antillas Holandesas');
INSERT INTO country (short_name, name) VALUES('SA', 'Arabia Saudí');
INSERT INTO country (short_name, name) VALUES('DZ', 'Argelia');
INSERT INTO country (short_name, name) VALUES('AR', 'Argentina');
INSERT INTO country (short_name, name) VALUES('AM', 'Armenia');
INSERT INTO country (short_name, name) VALUES('AW', 'Aruba');
INSERT INTO country (short_name, name) VALUES('AU', 'Australia');
INSERT INTO country (short_name, name) VALUES('AT', 'Austria');
INSERT INTO country (short_name, name) VALUES('AZ', 'Azerbaiyán');
INSERT INTO country (short_name, name) VALUES('BS', 'Bahamas');
INSERT INTO country (short_name, name) VALUES('BH', 'Bahréin');
INSERT INTO country (short_name, name) VALUES('BD', 'Bangladesh');
INSERT INTO country (short_name, name) VALUES('BB', 'Barbados');
INSERT INTO country (short_name, name) VALUES('BY', 'Bielorrusia');
INSERT INTO country (short_name, name) VALUES('BE', 'Bélgica');
INSERT INTO country (short_name, name) VALUES('BZ', 'Belice');
INSERT INTO country (short_name, name) VALUES('BJ', 'Benin');
INSERT INTO country (short_name, name) VALUES('BM', 'Bermudas');
INSERT INTO country (short_name, name) VALUES('BT', 'Bhután');
INSERT INTO country (short_name, name) VALUES('BO', 'Bolivia');
INSERT INTO country (short_name, name) VALUES('BA', 'Bosnia y Herzegovina');
INSERT INTO country (short_name, name) VALUES('BW', 'Botsuana');
INSERT INTO country (short_name, name) VALUES('BV', 'Isla Bouvet');
INSERT INTO country (short_name, name) VALUES('BR', 'Brasil');
INSERT INTO country (short_name, name) VALUES('BN', 'Brunéi');
INSERT INTO country (short_name, name) VALUES('BG', 'Bulgaria');
INSERT INTO country (short_name, name) VALUES('BF', 'Burkina Faso');
INSERT INTO country (short_name, name) VALUES('BI', 'Burundi');
INSERT INTO country (short_name, name) VALUES('CV', 'Cabo Verde');
INSERT INTO country (short_name, name) VALUES('KY', 'Islas Caimán');
INSERT INTO country (short_name, name) VALUES('KH', 'Camboya');
INSERT INTO country (short_name, name) VALUES('CM', 'Camerún');
INSERT INTO country (short_name, name) VALUES('CA', 'Canadá');
INSERT INTO country (short_name, name) VALUES('CF', 'República Centroafricana');
INSERT INTO country (short_name, name) VALUES('TD', 'Chad');
INSERT INTO country (short_name, name) VALUES('CZ', 'República Checa');
INSERT INTO country (short_name, name) VALUES('CL', 'Chile');
INSERT INTO country (short_name, name) VALUES('CN', 'China');
INSERT INTO country (short_name, name) VALUES('CY', 'Chipre');
INSERT INTO country (short_name, name) VALUES('CX', 'Isla de Navidad');
INSERT INTO country (short_name, name) VALUES('VA', 'Ciudad del Vaticano');
INSERT INTO country (short_name, name) VALUES('CC', 'Islas Cocos');
INSERT INTO country (short_name, name) VALUES('CO', 'Colombia');
INSERT INTO country (short_name, name) VALUES('KM', 'Comoras');
INSERT INTO country (short_name, name) VALUES('CD', 'República Democrática del Congo');
INSERT INTO country (short_name, name) VALUES('CG', 'Congo');
INSERT INTO country (short_name, name) VALUES('CK', 'Islas Cook');
INSERT INTO country (short_name, name) VALUES('KP', 'Corea del Norte');
INSERT INTO country (short_name, name) VALUES('KR', 'Corea del Sur');
INSERT INTO country (short_name, name) VALUES('CI', 'Costa de Marfil');
INSERT INTO country (short_name, name) VALUES('CR', 'Costa Rica');
INSERT INTO country (short_name, name) VALUES('HR', 'Croacia');
INSERT INTO country (short_name, name) VALUES('CU', 'Cuba');
INSERT INTO country (short_name, name) VALUES('DK', 'Dinamarca');
INSERT INTO country (short_name, name) VALUES('DM', 'Dominica');
INSERT INTO country (short_name, name) VALUES('DO', 'República Dominicana');
INSERT INTO country (short_name, name) VALUES('EC', 'Ecuador');
INSERT INTO country (short_name, name) VALUES('EG', 'Egipto');
INSERT INTO country (short_name, name) VALUES('SV', 'El Salvador');
INSERT INTO country (short_name, name) VALUES('AE', 'Emiratos Árabes Unidos');
INSERT INTO country (short_name, name) VALUES('ER', 'Eritrea');
INSERT INTO country (short_name, name) VALUES('SK', 'Eslovaquia');
INSERT INTO country (short_name, name) VALUES('SI', 'Eslovenia');
INSERT INTO country (short_name, name) VALUES('ES', 'España');
INSERT INTO country (short_name, name) VALUES('UM', 'Islas ultramarinas de Estados Unidos');
INSERT INTO country (short_name, name) VALUES('US', 'Estados Unidos');
INSERT INTO country (short_name, name) VALUES('EE', 'Estonia');
INSERT INTO country (short_name, name) VALUES('ET', 'Etiopía');
INSERT INTO country (short_name, name) VALUES('GB', 'Inglaterra');
INSERT INTO country (short_name, name) VALUES('FO', 'Islas Feroe');
INSERT INTO country (short_name, name) VALUES('PH', 'Filipinas');
INSERT INTO country (short_name, name) VALUES('FI', 'Finlandia');
INSERT INTO country (short_name, name) VALUES('FJ', 'Fiyi');
INSERT INTO country (short_name, name) VALUES('FR', 'Francia');
INSERT INTO country (short_name, name) VALUES('GA', 'Gabón');
INSERT INTO country (short_name, name) VALUES('GM', 'Gambia');
INSERT INTO country (short_name, name) VALUES('GE', 'Georgia');
INSERT INTO country (short_name, name) VALUES('GS', 'Islas Georgias del Sur y Sandwich del Sur');
INSERT INTO country (short_name, name) VALUES('GH', 'Ghana');
INSERT INTO country (short_name, name) VALUES('GI', 'Gibraltar');
INSERT INTO country (short_name, name) VALUES('GD', 'Granada');
INSERT INTO country (short_name, name) VALUES('GR', 'Grecia');
INSERT INTO country (short_name, name) VALUES('GL', 'Groenlandia');
INSERT INTO country (short_name, name) VALUES('GP', 'Guadalupe');
INSERT INTO country (short_name, name) VALUES('GU', 'Guam');
INSERT INTO country (short_name, name) VALUES('GT', 'Guatemala');
INSERT INTO country (short_name, name) VALUES('GF', 'Guayana Francesa');
INSERT INTO country (short_name, name) VALUES('GN', 'Guinea');
INSERT INTO country (short_name, name) VALUES('GQ', 'Guinea Ecuatorial');
INSERT INTO country (short_name, name) VALUES('GW', 'Guinea-Bissau');
INSERT INTO country (short_name, name) VALUES('GY', 'Guyana');
INSERT INTO country (short_name, name) VALUES('HT', 'Haití');
INSERT INTO country (short_name, name) VALUES('HM', 'Islas Heard y McDonald');
INSERT INTO country (short_name, name) VALUES('HN', 'Honduras');
INSERT INTO country (short_name, name) VALUES('HK', 'Hong Kong');
INSERT INTO country (short_name, name) VALUES('HU', 'Hungría');
INSERT INTO country (short_name, name) VALUES('IN', 'India');
INSERT INTO country (short_name, name) VALUES('ID', 'Indonesia');
INSERT INTO country (short_name, name) VALUES('IR', 'Irán');
INSERT INTO country (short_name, name) VALUES('IQ', 'Iraq');
INSERT INTO country (short_name, name) VALUES('IE', 'Irlanda');
INSERT INTO country (short_name, name) VALUES('IS', 'Islandia');
INSERT INTO country (short_name, name) VALUES('IL', 'Israel');
INSERT INTO country (short_name, name) VALUES('IT', 'Italia');
INSERT INTO country (short_name, name) VALUES('JM', 'Jamaica');
INSERT INTO country (short_name, name) VALUES('JP', 'Japón');
INSERT INTO country (short_name, name) VALUES('JO', 'Jordania');
INSERT INTO country (short_name, name) VALUES('KZ', 'Kazajstán');
INSERT INTO country (short_name, name) VALUES('KE', 'Kenia');
INSERT INTO country (short_name, name) VALUES('KG', 'Kirguistán');
INSERT INTO country (short_name, name) VALUES('KI', 'Kiribati');
INSERT INTO country (short_name, name) VALUES('KW', 'Kuwait');
INSERT INTO country (short_name, name) VALUES('LA', 'Laos');
INSERT INTO country (short_name, name) VALUES('LS', 'Lesotho');
INSERT INTO country (short_name, name) VALUES('LV', 'Letonia');
INSERT INTO country (short_name, name) VALUES('LB', 'Líbano');
INSERT INTO country (short_name, name) VALUES('LR', 'Liberia');
INSERT INTO country (short_name, name) VALUES('LY', 'Libia');
INSERT INTO country (short_name, name) VALUES('LI', 'Liechtenstein');
INSERT INTO country (short_name, name) VALUES('LT', 'Lituania');
INSERT INTO country (short_name, name) VALUES('LU', 'Luxemburgo');
INSERT INTO country (short_name, name) VALUES('MO', 'Macao');
INSERT INTO country (short_name, name) VALUES('MK', 'ARY Macedonia');
INSERT INTO country (short_name, name) VALUES('MG', 'Madagascar');
INSERT INTO country (short_name, name) VALUES('MY', 'Malasia');
INSERT INTO country (short_name, name) VALUES('MW', 'Malawi');
INSERT INTO country (short_name, name) VALUES('MV', 'Maldivas');
INSERT INTO country (short_name, name) VALUES('ML', 'Malí');
INSERT INTO country (short_name, name) VALUES('MT', 'Malta');
INSERT INTO country (short_name, name) VALUES('FK', 'Islas Malvinas');
INSERT INTO country (short_name, name) VALUES('MP', 'Islas Marianas del Norte');
INSERT INTO country (short_name, name) VALUES('MA', 'Marruecos');
INSERT INTO country (short_name, name) VALUES('MH', 'Islas Marshall');
INSERT INTO country (short_name, name) VALUES('MQ', 'Martinica');
INSERT INTO country (short_name, name) VALUES('MU', 'Mauricio');
INSERT INTO country (short_name, name) VALUES('MR', 'Mauritania');
INSERT INTO country (short_name, name) VALUES('YT', 'Mayotte');
INSERT INTO country (short_name, name) VALUES('MX', 'México');
INSERT INTO country (short_name, name) VALUES('FM', 'Micronesia');
INSERT INTO country (short_name, name) VALUES('MD', 'Moldavia');
INSERT INTO country (short_name, name) VALUES('MC', 'Mónaco');
INSERT INTO country (short_name, name) VALUES('MN', 'Mongolia');
INSERT INTO country (short_name, name) VALUES('MS', 'Montserrat');
INSERT INTO country (short_name, name) VALUES('MZ', 'Mozambique');
INSERT INTO country (short_name, name) VALUES('MM', 'Myanmar');
INSERT INTO country (short_name, name) VALUES('NA', 'Namibia');
INSERT INTO country (short_name, name) VALUES('NR', 'Nauru');
INSERT INTO country (short_name, name) VALUES('NP', 'Nepal');
INSERT INTO country (short_name, name) VALUES('NI', 'Nicaragua');
INSERT INTO country (short_name, name) VALUES('NE', 'Níger');
INSERT INTO country (short_name, name) VALUES('NG', 'Nigeria');
INSERT INTO country (short_name, name) VALUES('NU', 'Niue');
INSERT INTO country (short_name, name) VALUES('NF', 'Isla Norfolk');
INSERT INTO country (short_name, name) VALUES('NO', 'Noruega');
INSERT INTO country (short_name, name) VALUES('NC', 'Nueva Caledonia');
INSERT INTO country (short_name, name) VALUES('NZ', 'Nueva Zelanda');
INSERT INTO country (short_name, name) VALUES('OM', 'Omán');
INSERT INTO country (short_name, name) VALUES('NL', 'Países Bajos');
INSERT INTO country (short_name, name) VALUES('PK', 'Pakistán');
INSERT INTO country (short_name, name) VALUES('PW', 'Palau');
INSERT INTO country (short_name, name) VALUES('PS', 'Palestina');
INSERT INTO country (short_name, name) VALUES('PA', 'Panamá');
INSERT INTO country (short_name, name) VALUES('PG', 'Papúa Nueva Guinea');
INSERT INTO country (short_name, name) VALUES('PY', 'Paraguay');
INSERT INTO country (short_name, name) VALUES('PE', 'Perú');
INSERT INTO country (short_name, name) VALUES('PN', 'Islas Pitcairn');
INSERT INTO country (short_name, name) VALUES('PF', 'Polinesia Francesa');
INSERT INTO country (short_name, name) VALUES('PL', 'Polonia');
INSERT INTO country (short_name, name) VALUES('PT', 'Portugal');
INSERT INTO country (short_name, name) VALUES('PR', 'Puerto Rico');
INSERT INTO country (short_name, name) VALUES('QA', 'Qatar');
INSERT INTO country (short_name, name) VALUES('RE', 'Reunión');
INSERT INTO country (short_name, name) VALUES('RW', 'Ruanda');
INSERT INTO country (short_name, name) VALUES('RO', 'Rumania');
INSERT INTO country (short_name, name) VALUES('RU', 'Rusia');
INSERT INTO country (short_name, name) VALUES('EH', 'Sahara Occidental');
INSERT INTO country (short_name, name) VALUES('SB', 'Islas Salomón');
INSERT INTO country (short_name, name) VALUES('WS', 'Samoa');
INSERT INTO country (short_name, name) VALUES('AS', 'Samoa Americana');
INSERT INTO country (short_name, name) VALUES('KN', 'San Cristóbal y Nevis');
INSERT INTO country (short_name, name) VALUES('SM', 'San Marino');
INSERT INTO country (short_name, name) VALUES('PM', 'San Pedro y Miquelón');
INSERT INTO country (short_name, name) VALUES('VC', 'San Vicente y las Granadinas');
INSERT INTO country (short_name, name) VALUES('SH', 'Santa Helena');
INSERT INTO country (short_name, name) VALUES('LC', 'Santa Lucía');
INSERT INTO country (short_name, name) VALUES('ST', 'Santo Tomé y Príncipe');
INSERT INTO country (short_name, name) VALUES('SN', 'Senegal');
INSERT INTO country (short_name, name) VALUES('CS', 'Serbia y Montenegro');
INSERT INTO country (short_name, name) VALUES('SC', 'Seychelles');
INSERT INTO country (short_name, name) VALUES('SL', 'Sierra Leona');
INSERT INTO country (short_name, name) VALUES('SG', 'Singapur');
INSERT INTO country (short_name, name) VALUES('SY', 'Siria');
INSERT INTO country (short_name, name) VALUES('SO', 'Somalia');
INSERT INTO country (short_name, name) VALUES('LK', 'Sri Lanka');
INSERT INTO country (short_name, name) VALUES('SZ', 'Suazilandia');
INSERT INTO country (short_name, name) VALUES('ZA', 'Sudáfrica');
INSERT INTO country (short_name, name) VALUES('SD', 'Sudán');
INSERT INTO country (short_name, name) VALUES('SE', 'Suecia');
INSERT INTO country (short_name, name) VALUES('CH', 'Suiza');
INSERT INTO country (short_name, name) VALUES('SR', 'Surinam');
INSERT INTO country (short_name, name) VALUES('SJ', 'Svalbard y Jan Mayen');
INSERT INTO country (short_name, name) VALUES('TH', 'Tailandia');
INSERT INTO country (short_name, name) VALUES('TW', 'Taiwán');
INSERT INTO country (short_name, name) VALUES('TZ', 'Tanzania');
INSERT INTO country (short_name, name) VALUES('TJ', 'Tayikistán');
INSERT INTO country (short_name, name) VALUES('IO', 'Territorio Británico del Océano Índico');
INSERT INTO country (short_name, name) VALUES('TF', 'Territorios Australes Franceses');
INSERT INTO country (short_name, name) VALUES('TL', 'Timor Oriental');
INSERT INTO country (short_name, name) VALUES('TG', 'Togo');
INSERT INTO country (short_name, name) VALUES('TK', 'Tokelau');
INSERT INTO country (short_name, name) VALUES('TO', 'Tonga');
INSERT INTO country (short_name, name) VALUES('TT', 'Trinidad y Tobago');
INSERT INTO country (short_name, name) VALUES('TN', 'Túnez');
INSERT INTO country (short_name, name) VALUES('TC', 'Islas Turcas y Caicos');
INSERT INTO country (short_name, name) VALUES('TM', 'Turkmenistán');
INSERT INTO country (short_name, name) VALUES('TR', 'Turquía');
INSERT INTO country (short_name, name) VALUES('TV', 'Tuvalu');
INSERT INTO country (short_name, name) VALUES('UA', 'Ucrania');
INSERT INTO country (short_name, name) VALUES('UG', 'Uganda');
INSERT INTO country (short_name, name) VALUES('UY', 'Uruguay');
INSERT INTO country (short_name, name) VALUES('UZ', 'Uzbekistán');
INSERT INTO country (short_name, name) VALUES('VU', 'Vanuatu');
INSERT INTO country (short_name, name) VALUES('VE', 'Venezuela');
INSERT INTO country (short_name, name) VALUES('VN', 'Vietnam');
INSERT INTO country (short_name, name) VALUES('VG', 'Islas Vírgenes Británicas');
INSERT INTO country (short_name, name) VALUES('VI', 'Islas Vírgenes de los Estados Unidos');
INSERT INTO country (short_name, name) VALUES('WF', 'Wallis y Futuna');
INSERT INTO country (short_name, name) VALUES('YE', 'Yemen');
INSERT INTO country (short_name, name) VALUES('DJ', 'Yibuti');
INSERT INTO country (short_name, name) VALUES('ZM', 'Zambia');
INSERT INTO country (short_name, name) VALUES('ZW', 'Zimbabue');

Para importar la base de datos en PHPMyAdmin se tienen que quitar las primeras 2 lineas del archivo SQL.


Leave a comment

One thought on “Base de datos de Paises del Mundo en SQL