批量导入全球242个国家和代号到mysql数据库
我是自己有表的,只要按照相应的字段导入就行。字段可以直接添加删除,用dw正则表达批量替换
创建数据库:
CREATE TABLE IF NOT EXISTS `shanmao_country` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`dict_name` varchar(30) DEFAULT NULL,
`dict_type` varchar(30) DEFAULT NULL,
`dict_value` varchar(120) DEFAULT NULL,
`dict_value_zh_cn` varchar(120) DEFAULT NULL,
`dict_value_hk_cn` varchar(120) DEFAULT NULL,
`dict_value_ja_jp` varchar(120) DEFAULT NULL,
`remark` varchar(255) DEFAULT NULL,
`code` varchar(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_dictionary1` (`dict_type`,`dict_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=286 ;
批量导入242个国家数据:
INSERT INTO `shanmao_country` (`dict_type`, `dict_value`, `dict_name`, `code`) VALUES
(‘country’, ‘Afghanistan’, ‘AF’, ’93’),
(‘country’, ‘Albania’, ‘AL’, ‘355’),
(‘country’, ‘Algeria’, ‘DZ’, ‘213’),
(‘country’, ‘American Samoa’, ‘AS’, ‘684’),
(‘country’, ‘Andorra’, ‘AD’, ‘376’),
(‘country’, ‘Angola’, ‘AO’, ‘244’),
(‘country’, ‘Anguilla’, ‘AI’, ‘1-264’),
(‘country’, ‘Antarctica’, ‘AQ’, ‘672’),
(‘country’, ‘Antigua and Barbuda’, ‘AG’, ‘1-268’),
(‘country’, ‘Argentina’, ‘AR’, ’54’),
(‘country’, ‘Armenia’, ‘AM’, ‘374’),
(‘country’, ‘Aruba’, ‘AW’, ‘297’),
(‘country’, ‘Australia’, ‘AU’, ’61’),
(‘country’, ‘Austria’, ‘AT’, ’43’),
(‘country’, ‘Azerbaijan’, ‘AZ’, ‘994’),
(‘country’, ‘Bahamas’, ‘BS’, ‘1-242’),
(‘country’, ‘Bahrain’, ‘BH’, ‘973’),
(‘country’, ‘Bangladesh’, ‘BD’, ‘880’),
(‘country’, ‘Barbados’, ‘BB’, ‘1-246’),
(‘country’, ‘Belarus’, ‘BY’, ‘375’),
(‘country’, ‘Belgium’, ‘BE’, ’32’),
(‘country’, ‘Belize’, ‘BZ’, ‘501’),
(‘country’, ‘Benin’, ‘BJ’, ‘229’),
(‘country’, ‘Bermuda’, ‘BM’, ‘1-441’),
(‘country’, ‘Bhutan’, ‘BT’, ‘975’),
(‘country’, ‘Bolivia’, ‘BO’, ‘591’),
(‘country’, ‘Bosnia and Herzegovina’, ‘BA’, ‘387’),
(‘country’, ‘Botswana’, ‘BW’, ‘267’),
(‘country’, ‘Bouvet Island’, ‘BV’, ”),
(‘country’, ‘Brazil’, ‘BR’, ’55’),
(‘country’, ‘British Indian Ocean Territory’, ‘IO’, ‘1-284’),
(‘country’, ‘Brunei Darussalam’, ‘BN’, ‘673’),
(‘country’, ‘Bulgaria’, ‘BG’, ‘359’),
(‘country’, ‘Burkina Faso’, ‘BF’, ‘226’),
(‘country’, ‘Burundi’, ‘BI’, ‘257’),
(‘country’, ‘Cambodia’, ‘KH’, ‘855’),
(‘country’, ‘Cameroon’, ‘CM’, ‘237’),
(‘country’, ‘Canada’, ‘CA’, ‘1’),
(‘country’, ‘Cape Verde’, ‘CV’, ‘238’),
(‘country’, ‘Cayman Islands’, ‘KY’, ‘1-345’),
(‘country’, ‘Central African Republic’, ‘CF’, ‘236’),
(‘country’, ‘Chad’, ‘TD’, ‘235’),
(‘country’, ‘Chile’, ‘CL’, ’56’),
(‘country’, ‘China’, ‘CN’, ’86’),
(‘country’, ‘Christmas Island’, ‘CX’, ’61’),
(‘country’, ‘Cocos (Keeling) Islands’, ‘CC’, ’61’),
(‘country’, ‘Colombia’, ‘CO’, ’57’),
(‘country’, ‘Comoros’, ‘KM’, ‘269’),
(‘country’, ‘Congo’, ‘CG’, ‘242’),
(‘country’, ‘Congo, The Democratic Republic Of The’, ‘ZR’, ‘243’),
(‘country’, ‘Cook Islands’, ‘CK’, ‘682’),
(‘country’, ‘Costa Rica’, ‘CR’, ‘506’),
(‘country’, ‘Cote D”Ivoire’, ‘CI’, ‘225’),
(‘country’, ‘Croatia (local name: Hrvatska)’, ‘HR’, ‘385’),
(‘country’, ‘Cuba’, ‘CU’, ’53’),
(‘country’, ‘Cyprus’, ‘CY’, ‘357’),
(‘country’, ‘Czech Republic’, ‘CZ’, ‘420’),
(‘country’, ‘Denmark’, ‘DK’, ’45’),
(‘country’, ‘Djibouti’, ‘DJ’, ‘253’),
(‘country’, ‘Dominica’, ‘DM’, ‘1-767’),
(‘country’, ‘Dominican Republic’, ‘DO’, ‘1-809’),
(‘country’, ‘East Timor’, ‘TP’, ‘670’),
(‘country’, ‘Ecuador’, ‘EC’, ‘593’),
(‘country’, ‘Egypt’, ‘EG’, ’20’),
(‘country’, ‘El Salvador’, ‘SV’, ‘503’),
(‘country’, ‘Equatorial Guinea’, ‘GQ’, ‘240’),
(‘country’, ‘Eritrea’, ‘ER’, ‘291’),
(‘country’, ‘Estonia’, ‘EE’, ‘372’),
(‘country’, ‘Ethiopia’, ‘ET’, ‘251’),
(‘country’, ‘Falkland Islands (Malvinas)’, ‘FK’, ‘500’),
(‘country’, ‘Faroe Islands’, ‘FO’, ‘298’),
(‘country’, ‘Fiji’, ‘FJ’, ‘679’),
(‘country’, ‘Finland’, ‘FI’, ‘358’),
(‘country’, ‘France’, ‘FR’, ’33’),
(‘country’, ‘France Metropolitan’, ‘FX’, ’33’),
(‘country’, ‘French Guiana’, ‘GF’, ‘594’),
(‘country’, ‘French Polynesia’, ‘PF’, ‘689’),
(‘country’, ‘French Southern Territories’, ‘TF’, ”),
(‘country’, ‘Gabon’, ‘GA’, ‘241’),
(‘country’, ‘Gambia’, ‘GM’, ‘220’),
(‘country’, ‘Georgia’, ‘GE’, ‘995’),
(‘country’, ‘Germany’, ‘DE’, ’49’),
(‘country’, ‘Ghana’, ‘GH’, ‘233’),
(‘country’, ‘Gibraltar’, ‘GI’, ‘350’),
(‘country’, ‘Greece’, ‘GR’, ’30’),
(‘country’, ‘Greenland’, ‘GL’, ‘299’),
(‘country’, ‘Grenada’, ‘GD’, ‘1-473’),
(‘country’, ‘Guadeloupe’, ‘GP’, ‘590’),
(‘country’, ‘Guam’, ‘GU’, ‘1-671’),
(‘country’, ‘Guatemala’, ‘GT’, ‘502’),
(‘country’, ‘Guinea’, ‘GN’, ‘224’),
(‘country’, ‘Guinea-Bissau’, ‘GW’, ‘245’),
(‘country’, ‘Guyana’, ‘GY’, ‘592’),
(‘country’, ‘Haiti’, ‘HT’, ‘509’),
(‘country’, ‘Heard and Mc Donald Islands’, ‘HM’, ”),
(‘country’, ‘Honduras’, ‘HN’, ‘504’),
(‘country’, ‘Hong Kong’, ‘HK’, ‘852’),
(‘country’, ‘Hungary’, ‘HU’, ’36’),
(‘country’, ‘Iceland’, ‘IS’, ‘354’),
(‘country’, ‘India’, ‘IN’, ’91’),
(‘country’, ‘Indonesia’, ‘ID’, ’62’),
(‘country’, ‘Iran (Islamic Republic of)’, ‘IR’, ’98’),
(‘country’, ‘Iraq’, ‘IQ’, ‘964’),
(‘country’, ‘Ireland’, ‘IE’, ‘353’),
(‘country’, ‘Isle of Man’, ‘IM’, ”),
(‘country’, ‘Israel’, ‘IL’, ‘972’),
(‘country’, ‘Italy’, ‘IT’, ’39’),
(‘country’, ‘Jamaica’, ‘JM’, ‘1-876’),
(‘country’, ‘Japan’, ‘JP’, ’81’),
(‘country’, ‘Jordan’, ‘JO’, ‘962’),
(‘country’, ‘Kazakhstan’, ‘KZ’, ‘7’),
(‘country’, ‘Kenya’, ‘KE’, ‘254’),
(‘country’, ‘Kiribati’, ‘KI’, ‘686’),
(‘country’, ‘Kuwait’, ‘KW’, ‘965’),
(‘country’, ‘Kyrgyzstan’, ‘KG’, ‘996’),
(‘country’, ‘Lao People”s Democratic Republic’, ‘LA’, ”),
(‘country’, ‘Latvia’, ‘LV’, ‘371’),
(‘country’, ‘Lebanon’, ‘LB’, ‘961’),
(‘country’, ‘Lesotho’, ‘LS’, ‘266’),
(‘country’, ‘Liberia’, ‘LR’, ‘231’),
(‘country’, ‘Libyan Arab Jamahiriya’, ‘LY’, ‘218’),
(‘country’, ‘Liechtenstein’, ‘LI’, ‘423’),
(‘country’, ‘Lithuania’, ‘LT’, ‘370’),
(‘country’, ‘Luxembourg’, ‘LU’, ‘352’),
(‘country’, ‘Macau’, ‘MO’, ‘853’),
(‘country’, ‘Madagascar’, ‘MG’, ‘261’),
(‘country’, ‘Malawi’, ‘MW’, ‘265’),
(‘country’, ‘Malaysia’, ‘MY’, ’60’),
(‘country’, ‘Maldives’, ‘MV’, ‘960’),
(‘country’, ‘Mali’, ‘ML’, ‘223’),
(‘country’, ‘Malta’, ‘MT’, ‘356’),
(‘country’, ‘Marshall Islands’, ‘MH’, ‘692’),
(‘country’, ‘Martinique’, ‘MQ’, ‘596’),
(‘country’, ‘Mauritania’, ‘MR’, ‘222’),
(‘country’, ‘Mauritius’, ‘MU’, ‘230’),
(‘country’, ‘Mayotte’, ‘YT’, ‘269’),
(‘country’, ‘Mexico’, ‘MX’, ’52’),
(‘country’, ‘Micronesia’, ‘FM’, ‘691’),
(‘country’, ‘Moldova’, ‘MD’, ‘373’),
(‘country’, ‘Monaco’, ‘MC’, ‘377’),
(‘country’, ‘Mongolia’, ‘MN’, ‘976’),
(‘country’, ‘Montenegro’, ‘MNE’, ‘382’),
(‘country’, ‘Montserrat’, ‘MS’, ‘1-664’),
(‘country’, ‘Morocco’, ‘MA’, ‘212’),
(‘country’, ‘Mozambique’, ‘MZ’, ‘258’),
(‘country’, ‘Myanmar’, ‘MM’, ’95’),
(‘country’, ‘Namibia’, ‘NA’, ‘264’),
(‘country’, ‘Nauru’, ‘NR’, ‘674’),
(‘country’, ‘Nepal’, ‘NP’, ‘977’),
(‘country’, ‘Netherlands’, ‘NL’, ’31’),
(‘country’, ‘Netherlands Antilles’, ‘AN’, ‘599’),
(‘country’, ‘New Caledonia’, ‘NC’, ‘687’),
(‘country’, ‘New Zealand’, ‘NZ’, ’64’),
(‘country’, ‘Nicaragua’, ‘NI’, ‘505’),
(‘country’, ‘Niger’, ‘NE’, ‘227’),
(‘country’, ‘Nigeria’, ‘NG’, ‘234’),
(‘country’, ‘Niue’, ‘NU’, ‘683’),
(‘country’, ‘Norfolk Island’, ‘NF’, ‘672’),
(‘country’, ‘North Korea’, ‘KP’, ‘850’),
(‘country’, ‘Northern Mariana Islands’, ‘MP’, ‘1670’),
(‘country’, ‘Norway’, ‘NO’, ’47’),
(‘country’, ‘Oman’, ‘OM’, ‘968’),
(‘country’, ‘Pakistan’, ‘PK’, ’92’),
(‘country’, ‘Palau’, ‘PW’, ‘680’),
(‘country’, ‘Palestine’, ‘PS’, ‘970’),
(‘country’, ‘Panama’, ‘PA’, ‘507’),
(‘country’, ‘Papua New Guinea’, ‘PG’, ‘675’),
(‘country’, ‘Paraguay’, ‘PY’, ‘595’),
(‘country’, ‘Peru’, ‘PE’, ’51’),
(‘country’, ‘Philippines’, ‘PH’, ’63’),
(‘country’, ‘Pitcairn’, ‘PN’, ‘872’),
(‘country’, ‘Poland’, ‘PL’, ’48’),
(‘country’, ‘Portugal’, ‘PT’, ‘351’),
(‘country’, ‘Puerto Rico’, ‘PR’, ‘1-787’),
(‘country’, ‘Qatar’, ‘QA’, ‘974’),
(‘country’, ‘Reunion’, ‘RE’, ‘262’),
(‘country’, ‘Romania’, ‘RO’, ’40’),
(‘country’, ‘Russian Federation’, ‘RU’, ‘7’),
(‘country’, ‘Rwanda’, ‘RW’, ‘250’),
(‘country’, ‘Saint Kitts and Nevis’, ‘KN’, ”),
(‘country’, ‘Saint Lucia’, ‘LC’, ”),
(‘country’, ‘Saint Vincent and the Grenadines’, ‘VC’, ”),
(‘country’, ‘Samoa’, ‘WS’, ‘685’),
(‘country’, ‘San Marino’, ‘SM’, ‘378’),
(‘country’, ‘Sao Tome and Principe’, ‘ST’, ”),
(‘country’, ‘Saudi Arabia’, ‘SA’, ‘966’),
(‘country’, ‘Senegal’, ‘SN’, ‘221’),
(‘country’, ‘Serbia’, ‘SRB’, ‘381’),
(‘country’, ‘Seychelles’, ‘SC’, ‘248’),
(‘country’, ‘Sierra Leone’, ‘SL’, ‘232’),
(‘country’, ‘Singapore’, ‘SG’, ’65’),
(‘country’, ‘Slovakia (Slovak Republic)’, ‘SK’, ‘421’),
(‘country’, ‘Slovenia’, ‘SI’, ‘386’),
(‘country’, ‘Solomon Islands’, ‘SB’, ‘677’),
(‘country’, ‘Somalia’, ‘SO’, ‘252’),
(‘country’, ‘South Africa’, ‘ZA’, ’27’),
(‘country’, ‘South Korea’, ‘KR’, ’82’),
(‘country’, ‘Spain’, ‘ES’, ’34’),
(‘country’, ‘Sri Lanka’, ‘LK’, ’94’),
(‘country’, ‘St. Helena’, ‘SH’, ‘290’),
(‘country’, ‘St. Pierre and Miquelon’, ‘PM’, ‘508’),
(‘country’, ‘Sudan’, ‘SD’, ‘249’),
(‘country’, ‘Suriname’, ‘SR’, ‘597’),
(‘country’, ‘Svalbard and Jan Mayen Islands’, ‘SJ’, ”),
(‘country’, ‘Swaziland’, ‘SZ’, ‘268’),
(‘country’, ‘Sweden’, ‘SE’, ’46’),
(‘country’, ‘Switzerland’, ‘CH’, ’41’),
(‘country’, ‘Syrian Arab Republic’, ‘SY’, ‘963’),
(‘country’, ‘Taiwan’, ‘TW’, ‘886’),
(‘country’, ‘Tajikistan’, ‘TJ’, ‘992’),
(‘country’, ‘Tanzania’, ‘TZ’, ‘255’),
(‘country’, ‘Thailand’, ‘TH’, ’66’),
(‘country’, ‘The former Yugoslav Republic of Macedonia’, ‘MK’, ‘389’),
(‘country’, ‘Togo’, ‘TG’, ‘228’),
(‘country’, ‘Tokelau’, ‘TK’, ‘690’),
(‘country’, ‘Tonga’, ‘TO’, ‘676’),
(‘country’, ‘Trinidad and Tobago’, ‘TT’, ‘1-868’),
(‘country’, ‘Tunisia’, ‘TN’, ‘216’),
(‘country’, ‘Turkey’, ‘TR’, ’90’),
(‘country’, ‘Turkmenistan’, ‘TM’, ‘993’),
(‘country’, ‘Turks and Caicos Islands’, ‘TC’, ‘1-649’),
(‘country’, ‘Tuvalu’, ‘TV’, ‘688’),
(‘country’, ‘Uganda’, ‘UG’, ‘256’),
(‘country’, ‘Ukraine’, ‘UA’, ‘380’),
(‘country’, ‘United Arab Emirates’, ‘AE’, ‘971’),
(‘country’, ‘United Kingdom’, ‘UK’, ’44’),
(‘country’, ‘United States’, ‘US’, ‘1’),
(‘country’, ‘United States Minor Outlying Islands’, ‘UM’, ”),
(‘country’, ‘Uruguay’, ‘UY’, ‘598’),
(‘country’, ‘Uzbekistan’, ‘UZ’, ‘998’),
(‘country’, ‘Vanuatu’, ‘VU’, ‘678’),
(‘country’, ‘Vatican City State (Holy See)’, ‘VA’, ’39’),
(‘country’, ‘Venezuela’, ‘VE’, ’58’),
(‘country’, ‘Vietnam’, ‘VN’, ’84’),
(‘country’, ‘Virgin Islands (British)’, ‘VG’, ‘1284’),
(‘country’, ‘Virgin Islands (U.S.)’, ‘VI’, ‘1340’),
(‘country’, ‘Wallis And Futuna Islands’, ‘WF’, ‘681’),
(‘country’, ‘Western Sahara’, ‘EH’, ‘685’),
(‘country’, ‘Yemen’, ‘YE’, ‘967’),
(‘country’, ‘Yugoslavia’, ‘YU’, ‘381’),
(‘country’, ‘Zambia’, ‘ZM’, ‘260’),
(‘country’, ‘Zimbabwe’, ‘ZW’, ‘263’);