IP2Location™ ISO 3166-2 Subdivision Code

IP2Location™ ISO 3166-2 Subdivision Code is a free data offered for your download. This data provides you the ISO3166-2 code for the state/region used in our geolocation database. You can easily retrieve the ISO3166-2 code by mapping the country code and subdivision name.

IP2Location geolocation database or service is compliant with ISO 3166-2 in all countries except for the 49 countries listed below which don't have the official ISO3166-2 subdivisions defined.

AnguillaAntarcticaAmerican SamoaArubaAland IslandsSaint BarthelemyBermudaBouvet IslandCocos (Keeling) IslandsCook IslandsCuracaoChristmas IslandWestern SaharaFalkland Islands (Malvinas)Faroe IslandsFrench GuianaGuernseyGibraltarGuadeloupeSouth Georgia and The South Sandwich IslandsGuamHong KongHeard Island and Mcdonald IslandsIsle of ManBritish Indian Ocean TerritoryJerseyCayman IslandsSaint Martin (French Part)MacaoNorthern Mariana IslandsMartiniqueMontserratNew CaledoniaNorfolk IslandNiueFrench PolynesiaSaint Pierre and MiquelonPitcairnPuerto RicoReunionSvalbard and Jan MayenSint Maarten (Dutch Part)Turks and Caicos IslandsFrench Southern TerritoriesTokelauHoly SeeVirgin Islands, BritishVirgin Islands, U.S.Mayotte

 

Product Features
Last Update 10/27/2016
Database Format CSV Text File (Comma Delimited)

 

Database Fields
Name Type Description
country_code CHAR(2) Two-character country code based on ISO 3166.
subdivision_name VARCHAR(128) Subdivision name.
code VARCHAR(10) ISO3166-2 code.

 

MySQL Statement

CREATE TABLE `ip2location_iso3166_2`(
	`country_code` CHAR(2),
	`subdivision_name` VARCHAR(128),
	`code` VARCHAR(10),
	INDEX `idx_country_code` (`country_code`),
	INDEX `idx_region_name` (`subdivision_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

LOAD DATA LOCAL
INFILE 'IP2LOCATION-ISO3166-2.CSV' INTO TABLE `ip2location_iso3166_2`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n' IGNORE 1 LINES;

 

License Information

IP2Location™ is a registered trademark of HEXASOFT. All other trademarks are the property of their respective owners.

 

Thank you for downloading

Sharing this great stuff to your friends!

Or share it on your blog or web page:

Free IP2Location geolocation resources available at <a href="http://www.ip2location.com">http://www.ip2location.com</a>
Copy & paste this text as HTML.