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 30 countries listed below whereby there are no ISO3166-2 defined for the sub-divisions.

Aland Islands American Samoa Aruba Bermuda Falkland Islands (Malvinas) Faroe Islands French Guiana French Polynesia French Southern Territories Guam Guernsey Holy See Hong Kong Macao Macedonia, The Former Yugoslav Republic of Mayotte Montserrat Namibia New Caledonia Palestine, State of Pitcairn Puerto Rico Saint Martin (French Part) Serbia Sint Maarten (Dutch Part) South Georgia and The South Sandwich Islands Taiwan, Province of China Trinidad and Tobago Virgin Islands, British Virgin Islands, U.S.

 

Product Features
Last Update 06/22/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.