效果圖
窗體載入事件
//省份 string strSql_Province = "SELECT provinceid,province FROM province order by id asc"; DataTable dtComboBox_Province = clsDBHelperMySQL.m_Query(strSql_Province);//執行sql DataRow newRow_Province = dtComboBox_Province.NewRow(); newRow_Province[0] = "-1";// 給新行賦值 newRow_Province[1] = "--請選擇--";// 給新行賦值 dtComboBox_Province.Rows.InsertAt(newRow_Province, 0);//插入至第一行 this.cmbProvince.DataSource = dtComboBox_Province; this.cmbProvince.ValueMember = "provinceid";//繫結 this.cmbProvince.DisplayMember = "province"; //城市 string strSql_City ="SELECT city FROM city where provinceid='110000' order by id asc"; DataTable dtComboBox_City = clsDBHelperMySQL.m_Query(strSql_City );//執行sql this.cmbCity.Items.Add("--請選擇--"); foreach (DataRow row in dtComboBox_City.Rows) { this.cmbCity.Items.Add(row[0]); } this.cmbCity.SelectedIndex = 0;
省份下拉選單的 SelectedIndexChanged 事件
private void cmbProvince_SelectedIndexChanged(object sender, EventArgs e) { string strSelectedProvinceId = cmbProvince.SelectedValue.ToString(); if (strSelectedProvinceId == null || strSelectedProvinceId == "-1" || strSelectedProvinceId == "System.Data.DataRowView") { return; } //城市 this.cmbCity.Items.Clear(); string strSql_City = "SELECT city FROM city where provinceid='" + strSelectedProvinceId + "' order by id asc"; DataTable dtComboBox_City = clsDBHelperMySQL.m_Query(strSql_City);//執行sql this.cmbCity.Items.Add("--請選擇--"); foreach (DataRow row in dtComboBox_City.Rows) { this.cmbCity.Items.Add(row[0]); } this.cmbCity.SelectedIndex = 0; }
mySQL資料庫 建表語句
province 省份表
CREATE TABLE `province` ( `id` int(11) NOT NULL AUTO_INCREMENT, `provinceid` varchar(20) NOT NULL, `province` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 COMMENT='省份資訊表'; -- ---------------------------- -- Records of province -- ---------------------------- INSERT INTO `province` VALUES ('1', '110000', '北京市'); INSERT INTO `province` VALUES ('2', '120000', '天津市'); INSERT INTO `province` VALUES ('3', '130000', '河北省'); INSERT INTO `province` VALUES ('4', '140000', '山西省'); INSERT INTO `province` VALUES ('5', '150000', '內蒙古自治區'); INSERT INTO `province` VALUES ('6', '210000', '遼寧省'); INSERT INTO `province` VALUES ('7', '220000', '吉林省'); INSERT INTO `province` VALUES ('8', '230000', '黑龍江省'); INSERT INTO `province` VALUES ('9', '310000', '上海市'); INSERT INTO `province` VALUES ('10', '320000', '江蘇省'); INSERT INTO `province` VALUES ('11', '330000', '浙江省'); INSERT INTO `province` VALUES ('12', '340000', '安徽省'); INSERT INTO `province` VALUES ('13', '350000', '福建省'); INSERT INTO `province` VALUES ('14', '360000', '江西省'); INSERT INTO `province` VALUES ('15', '370000', '山東省'); INSERT INTO `province` VALUES ('16', '410000', '河南省'); INSERT INTO `province` VALUES ('17', '420000', '湖北省'); INSERT INTO `province` VALUES ('18', '430000', '湖南省'); INSERT INTO `province` VALUES ('19', '440000', '廣東省'); INSERT INTO `province` VALUES ('20', '450000', '廣西壯族自治區'); INSERT INTO `province` VALUES ('21', '460000', '海南省'); INSERT INTO `province` VALUES ('22', '500000', '重慶市'); INSERT INTO `province` VALUES ('23', '510000', '四川省'); INSERT INTO `province` VALUES ('24', '520000', '貴州省'); INSERT INTO `province` VALUES ('25', '530000', '雲南省'); INSERT INTO `province` VALUES ('26', '540000', '西藏自治區'); INSERT INTO `province` VALUES ('27', '610000', '陝西省'); INSERT INTO `province` VALUES ('28', '620000', '甘肅省'); INSERT INTO `province` VALUES ('29', '630000', '青海省'); INSERT INTO `province` VALUES ('30', '640000', '寧夏回族自治區'); INSERT INTO `province` VALUES ('31', '650000', '新疆維吾爾自治區'); INSERT INTO `province` VALUES ('32', '710000', '臺灣省'); INSERT INTO `province` VALUES ('33', '810000', '香港特別行政區'); INSERT INTO `province` VALUES ('34', '820000', '澳門特別行政區');
城市表 city
CREATE TABLE `city` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cityid` varchar(20) NOT NULL, `city` varchar(50) NOT NULL, `provinceid` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2147483648 DEFAULT CHARSET=utf8 COMMENT='行政區域地州市資訊表'; -- ---------------------------- -- Records of city -- ---------------------------- INSERT INTO `city` VALUES ('1', '110100', '東城區', '110000'); INSERT INTO `city` VALUES ('2', '110200', '西城區', '110000'); INSERT INTO `city` VALUES ('3', '120100', '和平區', '120000'); INSERT INTO `city` VALUES ('4', '120200', '河東區', '120000'); INSERT INTO `city` VALUES ('5', '130100', '石家莊市', '130000'); INSERT INTO `city` VALUES ('6', '130200', '唐山市', '130000'); INSERT INTO `city` VALUES ('7', '130300', '秦皇島市', '130000'); INSERT INTO `city` VALUES ('8', '130400', '邯鄲市', '130000'); INSERT INTO `city` VALUES ('9', '130500', '邢臺市', '130000'); INSERT INTO `city` VALUES ('10', '130600', '保定市', '130000'); INSERT INTO `city` VALUES ('11', '130700', '張家口市', '130000'); INSERT INTO `city` VALUES ('12', '130800', '承德市', '130000'); INSERT INTO `city` VALUES ('13', '130900', '滄州市', '130000'); INSERT INTO `city` VALUES ('14', '131000', '廊坊市', '130000'); INSERT INTO `city` VALUES ('15', '131100', '衡水市', '130000'); INSERT INTO `city` VALUES ('16', '140100', '太原市', '140000'); INSERT INTO `city` VALUES ('17', '140200', '大同市', '140000'); INSERT INTO `city` VALUES ('18', '140300', '陽泉市', '140000'); INSERT INTO `city` VALUES ('19', '140400', '長治市', '140000'); INSERT INTO `city` VALUES ('20', '140500', '晉城市', '140000'); INSERT INTO `city` VALUES ('21', '140600', '朔州市', '140000'); INSERT INTO `city` VALUES ('22', '140700', '晉中市', '140000'); INSERT INTO `city` VALUES ('23', '140800', '運城市', '140000'); INSERT INTO `city` VALUES ('24', '140900', '忻州市', '140000'); INSERT INTO `city` VALUES ('25', '141000', '臨汾市', '140000'); INSERT INTO `city` VALUES ('26', '141100', '呂梁市', '140000'); INSERT INTO `city` VALUES ('27', '150100', '呼和浩特市', '150000'); INSERT INTO `city` VALUES ('28', '150200', '包頭市', '150000'); INSERT INTO `city` VALUES ('29', '150300', '烏海市', '150000'); INSERT INTO `city` VALUES ('30', '150400', '赤峰市', '150000'); INSERT INTO `city` VALUES ('31', '150500', '通遼市', '150000'); INSERT INTO `city` VALUES ('32', '150600', '鄂爾多斯市', '150000'); INSERT INTO `city` VALUES ('33', '150700', '呼倫貝爾市', '150000'); INSERT INTO `city` VALUES ('34', '150800', '巴彥淖爾市', '150000'); INSERT INTO `city` VALUES ('35', '150900', '烏蘭察布市', '150000'); INSERT INTO `city` VALUES ('36', '152200', '興安盟', '150000'); INSERT INTO `city` VALUES ('37', '152500', '錫林郭勒盟', '150000'); INSERT INTO `city` VALUES ('38', '152900', '阿拉善盟', '150000'); INSERT INTO `city` VALUES ('39', '210100', '瀋陽市', '210000'); INSERT INTO `city` VALUES ('40', '210200', '大連市', '210000'); INSERT INTO `city` VALUES ('41', '210300', '鞍山市', '210000'); INSERT INTO `city` VALUES ('42', '210400', '撫順市', '210000'); INSERT INTO `city` VALUES ('43', '210500', '本溪市', '210000'); INSERT INTO `city` VALUES ('44', '210600', '丹東市', '210000'); INSERT INTO `city` VALUES ('45', '210700', '錦州市', '210000'); INSERT INTO `city` VALUES ('46', '210800', '營口市', '210000'); INSERT INTO `city` VALUES ('47', '210900', '阜新市', '210000'); INSERT INTO `city` VALUES ('48', '211000', '遼陽市', '210000'); INSERT INTO `city` VALUES ('49', '211100', '盤錦市', '210000'); INSERT INTO `city` VALUES ('50', '211200', '鐵嶺市', '210000'); INSERT INTO `city` VALUES ('51', '211300', '朝陽市', '210000'); INSERT INTO `city` VALUES ('52', '211400', '葫蘆島市', '210000'); INSERT INTO `city` VALUES ('53', '220100', '長春市', '220000'); INSERT INTO `city` VALUES ('54', '220200', '吉林市', '220000'); INSERT INTO `city` VALUES ('55', '220300', '四平市', '220000'); INSERT INTO `city` VALUES ('56', '220400', '遼源市', '220000'); INSERT INTO `city` VALUES ('57', '220500', '通化市', '220000'); INSERT INTO `city` VALUES ('58', '220600', '白山市', '220000'); INSERT INTO `city` VALUES ('59', '220700', '松原市', '220000'); INSERT INTO `city` VALUES ('60', '220800', '白城市', '220000'); INSERT INTO `city` VALUES ('61', '222400', '延吉市', '220000'); INSERT INTO `city` VALUES ('62', '230100', '哈爾濱市', '230000'); INSERT INTO `city` VALUES ('63', '230200', '齊齊哈爾市', '230000'); INSERT INTO `city` VALUES ('64', '230300', '雞西市', '230000'); INSERT INTO `city` VALUES ('65', '230400', '鶴崗市', '230000'); INSERT INTO `city` VALUES ('66', '230500', '雙鴨山市', '230000'); INSERT INTO `city` VALUES ('67', '230600', '大慶市', '230000'); INSERT INTO `city` VALUES ('68', '230700', '伊春市', '230000'); INSERT INTO `city` VALUES ('69', '230800', '佳木斯市', '230000'); INSERT INTO `city` VALUES ('70', '230900', '七臺河市', '230000'); INSERT INTO `city` VALUES ('71', '231000', '牡丹江市', '230000'); INSERT INTO `city` VALUES ('72', '231100', '黑河市', '230000'); INSERT INTO `city` VALUES ('73', '231200', '綏化市', '230000'); INSERT INTO `city` VALUES ('74', '232700', '大興安嶺地區', '230000'); INSERT INTO `city` VALUES ('75', '310100', '黃浦區', '310000'); INSERT INTO `city` VALUES ('76', '310200', '盧灣區', '310000'); INSERT INTO `city` VALUES ('77', '320100', '南京市', '320000'); INSERT INTO `city` VALUES ('78', '320200', '無錫市', '320000'); INSERT INTO `city` VALUES ('79', '320300', '徐州市', '320000'); INSERT INTO `city` VALUES ('80', '320400', '常州市', '320000'); INSERT INTO `city` VALUES ('81', '320500', '蘇州市', '320000'); INSERT INTO `city` VALUES ('82', '320600', '南通市', '320000'); INSERT INTO `city` VALUES ('83', '320700', '連雲港市', '320000'); INSERT INTO `city` VALUES ('84', '320800', '淮安市', '320000'); INSERT INTO `city` VALUES ('85', '320900', '鹽城市', '320000'); INSERT INTO `city` VALUES ('86', '321000', '揚州市', '320000'); INSERT INTO `city` VALUES ('87', '321100', '鎮江市', '320000'); INSERT INTO `city` VALUES ('88', '321200', '泰州市', '320000'); INSERT INTO `city` VALUES ('89', '321300', '宿遷市', '320000'); INSERT INTO `city` VALUES ('90', '330100', '杭州市', '330000'); INSERT INTO `city` VALUES ('91', '330200', '寧波市', '330000'); INSERT INTO `city` VALUES ('92', '330300', '溫州市', '330000'); INSERT INTO `city` VALUES ('93', '330400', '嘉興市', '330000'); INSERT INTO `city` VALUES ('94', '330500', '湖州市', '330000'); INSERT INTO `city` VALUES ('95', '330600', '紹興市', '330000'); INSERT INTO `city` VALUES ('96', '330700', '金華市', '330000'); INSERT INTO `city` VALUES ('97', '330800', '衢州市', '330000'); INSERT INTO `city` VALUES ('98', '330900', '舟山市', '330000'); INSERT INTO `city` VALUES ('99', '331000', '台州市', '330000'); INSERT INTO `city` VALUES ('100', '331100', '麗水市', '330000'); INSERT INTO `city` VALUES ('101', '340100', '合肥市', '340000'); INSERT INTO `city` VALUES ('102', '340200', '蕪湖市', '340000'); INSERT INTO `city` VALUES ('103', '340300', '蚌埠市', '340000'); INSERT INTO `city` VALUES ('104', '340400', '淮南市', '340000'); INSERT INTO `city` VALUES ('105', '340500', '馬鞍山市', '340000'); INSERT INTO `city` VALUES ('106', '340600', '淮北市', '340000'); INSERT INTO `city` VALUES ('107', '340700', '銅陵市', '340000'); INSERT INTO `city` VALUES ('108', '340800', '安慶市', '340000'); INSERT INTO `city` VALUES ('109', '341000', '黃山市', '340000'); INSERT INTO `city` VALUES ('110', '341100', '滁州市', '340000'); INSERT INTO `city` VALUES ('111', '341200', '阜陽市', '340000'); INSERT INTO `city` VALUES ('112', '341300', '宿州市', '340000'); INSERT INTO `city` VALUES ('113', '341400', '巢湖市', '340000'); INSERT INTO `city` VALUES ('114', '341500', '六安市', '340000'); INSERT INTO `city` VALUES ('115', '341600', '亳州市', '340000'); INSERT INTO `city` VALUES ('116', '341700', '池州市', '340000'); INSERT INTO `city` VALUES ('117', '341800', '宣城市', '340000'); INSERT INTO `city` VALUES ('118', '350100', '福州市', '350000'); INSERT INTO `city` VALUES ('119', '350200', '廈門市', '350000'); INSERT INTO `city` VALUES ('120', '350300', '莆田市', '350000'); INSERT INTO `city` VALUES ('121', '350400', '三明市', '350000'); INSERT INTO `city` VALUES ('122', '350500', '泉州市', '350000'); INSERT INTO `city` VALUES ('123', '350600', '漳州市', '350000'); INSERT INTO `city` VALUES ('124', '350700', '南平市', '350000'); INSERT INTO `city` VALUES ('125', '350800', '龍巖市', '350000'); INSERT INTO `city` VALUES ('126', '350900', '寧德市', '350000'); INSERT INTO `city` VALUES ('127', '360100', '南昌市', '360000'); INSERT INTO `city` VALUES ('128', '360200', '景德鎮市', '360000'); INSERT INTO `city` VALUES ('129', '360300', '萍鄉市', '360000'); INSERT INTO `city` VALUES ('130', '360400', '九江市', '360000'); INSERT INTO `city` VALUES ('131', '360500', '新餘市', '360000'); INSERT INTO `city` VALUES ('132', '360600', '鷹潭市', '360000'); INSERT INTO `city` VALUES ('133', '360700', '贛州市', '360000'); INSERT INTO `city` VALUES ('134', '360800', '吉安市', '360000'); INSERT INTO `city` VALUES ('135', '360900', '宜春市', '360000'); INSERT INTO `city` VALUES ('136', '361000', '撫州市', '360000'); INSERT INTO `city` VALUES ('137', '361100', '上饒市', '360000'); INSERT INTO `city` VALUES ('138', '370100', '濟南市', '370000'); INSERT INTO `city` VALUES ('139', '370200', '青島市', '370000'); INSERT INTO `city` VALUES ('140', '370300', '淄博市', '370000'); INSERT INTO `city` VALUES ('141', '370400', '棗莊市', '370000'); INSERT INTO `city` VALUES ('142', '370500', '東營市', '370000'); INSERT INTO `city` VALUES ('143', '370600', '煙臺市', '370000'); INSERT INTO `city` VALUES ('144', '370700', '濰坊市', '370000'); INSERT INTO `city` VALUES ('145', '370800', '濟寧市', '370000'); INSERT INTO `city` VALUES ('146', '370900', '泰安市', '370000'); INSERT INTO `city` VALUES ('147', '371000', '威海市', '370000'); INSERT INTO `city` VALUES ('148', '371100', '日照市', '370000'); INSERT INTO `city` VALUES ('149', '371200', '萊蕪市', '370000'); INSERT INTO `city` VALUES ('150', '371300', '臨沂市', '370000'); INSERT INTO `city` VALUES ('151', '371400', '德州市', '370000'); INSERT INTO `city` VALUES ('152', '371500', '聊城市', '370000'); INSERT INTO `city` VALUES ('153', '371600', '濱州市', '370000'); INSERT INTO `city` VALUES ('154', '371700', '荷澤市', '370000'); INSERT INTO `city` VALUES ('155', '410100', '鄭州市', '410000'); INSERT INTO `city` VALUES ('156', '410200', '開封市', '410000'); INSERT INTO `city` VALUES ('157', '410300', '洛陽市', '410000'); INSERT INTO `city` VALUES ('158', '410400', '平頂山市', '410000'); INSERT INTO `city` VALUES ('159', '410500', '安陽市', '410000'); INSERT INTO `city` VALUES ('160', '410600', '鶴壁市', '410000'); INSERT INTO `city` VALUES ('161', '410700', '新鄉市', '410000'); INSERT INTO `city` VALUES ('162', '410800', '焦作市', '410000'); INSERT INTO `city` VALUES ('163', '410900', '濮陽市', '410000'); INSERT INTO `city` VALUES ('164', '411000', '許昌市', '410000'); INSERT INTO `city` VALUES ('165', '411100', '漯河市', '410000'); INSERT INTO `city` VALUES ('166', '411200', '三門峽市', '410000'); INSERT INTO `city` VALUES ('167', '411300', '南陽市', '410000'); INSERT INTO `city` VALUES ('168', '411400', '商丘市', '410000'); INSERT INTO `city` VALUES ('169', '411500', '信陽市', '410000'); INSERT INTO `city` VALUES ('170', '411600', '周口市', '410000'); INSERT INTO `city` VALUES ('171', '411700', '駐馬店市', '410000'); INSERT INTO `city` VALUES ('172', '420100', '武漢市', '420000'); INSERT INTO `city` VALUES ('173', '420200', '黃石市', '420000'); INSERT INTO `city` VALUES ('174', '420300', '十堰市', '420000'); INSERT INTO `city` VALUES ('175', '420500', '宜昌市', '420000'); INSERT INTO `city` VALUES ('176', '420600', '襄樊市', '420000'); INSERT INTO `city` VALUES ('177', '420700', '鄂州市', '420000'); INSERT INTO `city` VALUES ('178', '420800', '荊門市', '420000'); INSERT INTO `city` VALUES ('179', '420900', '孝感市', '420000'); INSERT INTO `city` VALUES ('180', '421000', '荊州市', '420000'); INSERT INTO `city` VALUES ('181', '421100', '黃岡市', '420000'); INSERT INTO `city` VALUES ('182', '421200', '咸寧市', '420000'); INSERT INTO `city` VALUES ('183', '421300', '隨州市', '420000'); INSERT INTO `city` VALUES ('184', '422800', '恩施土家族苗族自治州', '420000'); INSERT INTO `city` VALUES ('185', '429000', '省直轄行政單位', '420000'); INSERT INTO `city` VALUES ('186', '430100', '長沙市', '430000'); INSERT INTO `city` VALUES ('187', '430200', '株洲市', '430000'); INSERT INTO `city` VALUES ('188', '430300', '湘潭市', '430000'); INSERT INTO `city` VALUES ('189', '430400', '衡陽市', '430000'); INSERT INTO `city` VALUES ('190', '430500', '邵陽市', '430000'); INSERT INTO `city` VALUES ('191', '430600', '岳陽市', '430000'); INSERT INTO `city` VALUES ('192', '430700', '常德市', '430000'); INSERT INTO `city` VALUES ('193', '430800', '張家界市', '430000'); INSERT INTO `city` VALUES ('194', '430900', '益陽市', '430000'); INSERT INTO `city` VALUES ('195', '431000', '郴州市', '430000'); INSERT INTO `city` VALUES ('196', '431100', '永州市', '430000'); INSERT INTO `city` VALUES ('197', '431200', '懷化市', '430000'); INSERT INTO `city` VALUES ('198', '431300', '婁底市', '430000'); INSERT INTO `city` VALUES ('199', '433100', '湘西土家族苗族自治州', '430000'); INSERT INTO `city` VALUES ('200', '440100', '廣州市', '440000'); INSERT INTO `city` VALUES ('201', '440200', '韶關市', '440000'); INSERT INTO `city` VALUES ('202', '440300', '深圳市', '440000'); INSERT INTO `city` VALUES ('203', '440400', '珠海市', '440000'); INSERT INTO `city` VALUES ('204', '440500', '汕頭市', '440000'); INSERT INTO `city` VALUES ('205', '440600', '佛山市', '440000'); INSERT INTO `city` VALUES ('206', '440700', '江門市', '440000'); INSERT INTO `city` VALUES ('207', '440800', '湛江市', '440000'); INSERT INTO `city` VALUES ('208', '440900', '茂名市', '440000'); INSERT INTO `city` VALUES ('209', '441200', '肇慶市', '440000'); INSERT INTO `city` VALUES ('210', '441300', '惠州市', '440000'); INSERT INTO `city` VALUES ('211', '441400', '梅州市', '440000'); INSERT INTO `city` VALUES ('212', '441500', '汕尾市', '440000'); INSERT INTO `city` VALUES ('213', '441600', '河源市', '440000'); INSERT INTO `city` VALUES ('214', '441700', '陽江市', '440000'); INSERT INTO `city` VALUES ('215', '441800', '清遠市', '440000'); INSERT INTO `city` VALUES ('216', '441900', '東莞市', '440000'); INSERT INTO `city` VALUES ('217', '442000', '中山市', '440000'); INSERT INTO `city` VALUES ('218', '445100', '潮州市', '440000'); INSERT INTO `city` VALUES ('219', '445200', '揭陽市', '440000'); INSERT INTO `city` VALUES ('220', '445300', '雲浮市', '440000'); INSERT INTO `city` VALUES ('221', '450100', '南寧市', '450000'); INSERT INTO `city` VALUES ('222', '450200', '柳州市', '450000'); INSERT INTO `city` VALUES ('223', '450300', '桂林市', '450000'); INSERT INTO `city` VALUES ('224', '450400', '梧州市', '450000'); INSERT INTO `city` VALUES ('225', '450500', '北海市', '450000'); INSERT INTO `city` VALUES ('226', '450600', '防城港市', '450000'); INSERT INTO `city` VALUES ('227', '450700', '欽州市', '450000'); INSERT INTO `city` VALUES ('228', '450800', '貴港市', '450000'); INSERT INTO `city` VALUES ('229', '450900', '玉林市', '450000'); INSERT INTO `city` VALUES ('230', '451000', '百色市', '450000'); INSERT INTO `city` VALUES ('231', '451100', '賀州市', '450000'); INSERT INTO `city` VALUES ('232', '451200', '河池市', '450000'); INSERT INTO `city` VALUES ('233', '451300', '來賓市', '450000'); INSERT INTO `city` VALUES ('234', '451400', '崇左市', '450000'); INSERT INTO `city` VALUES ('235', '460100', '海口市', '460000'); INSERT INTO `city` VALUES ('236', '460200', '三亞市', '460000'); INSERT INTO `city` VALUES ('237', '469000', '省直轄縣級行政單位', '460000'); INSERT INTO `city` VALUES ('238', '500100', '萬州區', '500000'); INSERT INTO `city` VALUES ('239', '500200', '涪陵區', '500000'); INSERT INTO `city` VALUES ('240', '500300', '渝中區', '500000'); INSERT INTO `city` VALUES ('241', '510100', '成都市', '510000'); INSERT INTO `city` VALUES ('242', '510300', '自貢市', '510000'); INSERT INTO `city` VALUES ('243', '510400', '攀枝花市', '510000'); INSERT INTO `city` VALUES ('244', '510500', '瀘州市', '510000'); INSERT INTO `city` VALUES ('245', '510600', '德陽市', '510000'); INSERT INTO `city` VALUES ('246', '510700', '綿陽市', '510000'); INSERT INTO `city` VALUES ('247', '510800', '廣元市', '510000'); INSERT INTO `city` VALUES ('248', '510900', '遂寧市', '510000'); INSERT INTO `city` VALUES ('249', '511000', '內江市', '510000'); INSERT INTO `city` VALUES ('250', '511100', '樂山市', '510000'); INSERT INTO `city` VALUES ('251', '511300', '南充市', '510000'); INSERT INTO `city` VALUES ('252', '511400', '眉山市', '510000'); INSERT INTO `city` VALUES ('253', '511500', '宜賓市', '510000'); INSERT INTO `city` VALUES ('254', '511600', '廣安市', '510000'); INSERT INTO `city` VALUES ('255', '511700', '達州市', '510000'); INSERT INTO `city` VALUES ('256', '511800', '雅安市', '510000'); INSERT INTO `city` VALUES ('257', '511900', '巴中市', '510000'); INSERT INTO `city` VALUES ('258', '512000', '資陽市', '510000'); INSERT INTO `city` VALUES ('259', '513200', '阿壩藏族羌族自治州', '510000'); INSERT INTO `city` VALUES ('260', '513300', '甘孜藏族自治州', '510000'); INSERT INTO `city` VALUES ('261', '513400', '涼山彝族自治州', '510000'); INSERT INTO `city` VALUES ('262', '520100', '貴陽市', '520000'); INSERT INTO `city` VALUES ('263', '520200', '六盤水市', '520000'); INSERT INTO `city` VALUES ('264', '520300', '遵義市', '520000'); INSERT INTO `city` VALUES ('265', '520400', '安順市', '520000'); INSERT INTO `city` VALUES ('266', '522200', '銅仁地區', '520000'); INSERT INTO `city` VALUES ('267', '522300', '黔西南布依族苗族自治州', '520000'); INSERT INTO `city` VALUES ('268', '522400', '畢節地區', '520000'); INSERT INTO `city` VALUES ('269', '522600', '黔東南苗族侗族自治州', '520000'); INSERT INTO `city` VALUES ('270', '522700', '黔南布依族苗族自治州', '520000'); INSERT INTO `city` VALUES ('271', '530100', '昆明市', '530000'); INSERT INTO `city` VALUES ('272', '530300', '曲靖市', '530000'); INSERT INTO `city` VALUES ('273', '530400', '玉溪市', '530000'); INSERT INTO `city` VALUES ('274', '530500', '保山市', '530000'); INSERT INTO `city` VALUES ('275', '530600', '昭通市', '530000'); INSERT INTO `city` VALUES ('276', '530700', '麗江市', '530000'); INSERT INTO `city` VALUES ('277', '530800', '思茅市', '530000'); INSERT INTO `city` VALUES ('278', '530900', '臨滄市', '530000'); INSERT INTO `city` VALUES ('279', '532300', '楚雄彝族自治州', '530000'); INSERT INTO `city` VALUES ('280', '532500', '紅河哈尼族彝族自治州', '530000'); INSERT INTO `city` VALUES ('281', '532600', '文山壯族苗族自治州', '530000'); INSERT INTO `city` VALUES ('282', '532800', '西雙版納傣族自治州', '530000'); INSERT INTO `city` VALUES ('283', '532900', '大理白族自治州', '530000'); INSERT INTO `city` VALUES ('284', '533100', '德宏傣族景頗族自治州', '530000'); INSERT INTO `city` VALUES ('285', '533300', '怒江傈僳族自治州', '530000'); INSERT INTO `city` VALUES ('286', '533400', '迪慶藏族自治州', '530000'); INSERT INTO `city` VALUES ('287', '540100', '拉薩市', '540000'); INSERT INTO `city` VALUES ('288', '542100', '昌都地區', '540000'); INSERT INTO `city` VALUES ('289', '542200', '山南地區', '540000'); INSERT INTO `city` VALUES ('290', '542300', '日喀則地區', '540000'); INSERT INTO `city` VALUES ('291', '542400', '那曲地區', '540000'); INSERT INTO `city` VALUES ('292', '542500', '阿里地區', '540000'); INSERT INTO `city` VALUES ('293', '542600', '林芝地區', '540000'); INSERT INTO `city` VALUES ('294', '610100', '西安市', '610000'); INSERT INTO `city` VALUES ('295', '610200', '銅川市', '610000'); INSERT INTO `city` VALUES ('296', '610300', '寶雞市', '610000'); INSERT INTO `city` VALUES ('297', '610400', '咸陽市', '610000'); INSERT INTO `city` VALUES ('298', '610500', '渭南市', '610000'); INSERT INTO `city` VALUES ('299', '610600', '延安市', '610000'); INSERT INTO `city` VALUES ('300', '610700', '漢中市', '610000'); INSERT INTO `city` VALUES ('301', '610800', '榆林市', '610000'); INSERT INTO `city` VALUES ('302', '610900', '安康市', '610000'); INSERT INTO `city` VALUES ('303', '611000', '商洛市', '610000'); INSERT INTO `city` VALUES ('304', '620100', '蘭州市', '620000'); INSERT INTO `city` VALUES ('305', '620200', '嘉峪關市', '620000'); INSERT INTO `city` VALUES ('306', '620300', '金昌市', '620000'); INSERT INTO `city` VALUES ('307', '620400', '白銀市', '620000'); INSERT INTO `city` VALUES ('308', '620500', '天水市', '620000'); INSERT INTO `city` VALUES ('309', '620600', '武威市', '620000'); INSERT INTO `city` VALUES ('310', '620700', '張掖市', '620000'); INSERT INTO `city` VALUES ('311', '620800', '平涼市', '620000'); INSERT INTO `city` VALUES ('312', '620900', '酒泉市', '620000'); INSERT INTO `city` VALUES ('313', '621000', '慶陽市', '620000'); INSERT INTO `city` VALUES ('314', '621100', '定西市', '620000'); INSERT INTO `city` VALUES ('315', '621200', '隴南市', '620000'); INSERT INTO `city` VALUES ('316', '622900', '臨夏回族自治州', '620000'); INSERT INTO `city` VALUES ('317', '623000', '甘南藏族自治州', '620000'); INSERT INTO `city` VALUES ('318', '630100', '西寧市', '630000'); INSERT INTO `city` VALUES ('319', '632100', '海東地區', '630000'); INSERT INTO `city` VALUES ('320', '632200', '海北藏族自治州', '630000'); INSERT INTO `city` VALUES ('321', '632300', '黃南藏族自治州', '630000'); INSERT INTO `city` VALUES ('322', '632500', '海南藏族自治州', '630000'); INSERT INTO `city` VALUES ('323', '632600', '果洛藏族自治州', '630000'); INSERT INTO `city` VALUES ('324', '632700', '玉樹藏族自治州', '630000'); INSERT INTO `city` VALUES ('325', '632800', '海西蒙古族藏族自治州', '630000'); INSERT INTO `city` VALUES ('326', '640100', '銀川市', '640000'); INSERT INTO `city` VALUES ('327', '640200', '石嘴山市', '640000'); INSERT INTO `city` VALUES ('328', '640300', '吳忠市', '640000'); INSERT INTO `city` VALUES ('329', '640400', '固原市', '640000'); INSERT INTO `city` VALUES ('330', '640500', '中衛市', '640000'); INSERT INTO `city` VALUES ('331', '650100', '烏魯木齊市', '650000'); INSERT INTO `city` VALUES ('332', '650200', '克拉瑪依市', '650000'); INSERT INTO `city` VALUES ('333', '652100', '吐魯番地區', '650000'); INSERT INTO `city` VALUES ('334', '652200', '哈密地區', '650000'); INSERT INTO `city` VALUES ('335', '652300', '昌吉回族自治州', '650000'); INSERT INTO `city` VALUES ('336', '652700', '博爾塔拉蒙古自治州', '650000'); INSERT INTO `city` VALUES ('337', '652800', '巴音郭楞蒙古自治州', '650000'); INSERT INTO `city` VALUES ('338', '652900', '阿克蘇地區', '650000'); INSERT INTO `city` VALUES ('339', '653000', '克孜勒蘇柯爾克孜自治州', '650000'); INSERT INTO `city` VALUES ('340', '653100', '喀什地區', '650000'); INSERT INTO `city` VALUES ('341', '653200', '和田地區', '650000'); INSERT INTO `city` VALUES ('342', '654000', '伊犁哈薩克自治州', '650000'); INSERT INTO `city` VALUES ('343', '654200', '塔城地區', '650000'); INSERT INTO `city` VALUES ('344', '654300', '阿勒泰地區', '650000'); INSERT INTO `city` VALUES ('345', '659000', '省直轄行政單位', '650000'); INSERT INTO `city` VALUES ('12010019', '120101', '和平區', '120000'); INSERT INTO `city` VALUES ('1101003', '110103', '崇文區', '110000'); INSERT INTO `city` VALUES ('1101004', '110104', '宣武區', '110000'); INSERT INTO `city` VALUES ('1101005', '110105', '朝陽區', '110000'); INSERT INTO `city` VALUES ('1101006', '110106', '豐臺區', '110000'); INSERT INTO `city` VALUES ('1101007', '110107', '石景山區', '110000'); INSERT INTO `city` VALUES ('1101008', '110108', '海淀區', '110000'); INSERT INTO `city` VALUES ('1101009', '110109', '門頭溝區', '110000'); INSERT INTO `city` VALUES ('11010010', '110111', '房山區', '110000'); INSERT INTO `city` VALUES ('11010011', '110112', '通州區', '110000'); INSERT INTO `city` VALUES ('11010012', '110113', '順義區', '110000'); INSERT INTO `city` VALUES ('11010013', '110114', '昌平區', '110000'); INSERT INTO `city` VALUES ('11010014', '110115', '大興區', '110000'); INSERT INTO `city` VALUES ('11010015', '110116', '懷柔區', '110000'); INSERT INTO `city` VALUES ('11010016', '110117', '平谷區', '110000'); INSERT INTO `city` VALUES ('11010017', '110228', '密雲縣', '110000'); INSERT INTO `city` VALUES ('11010018', '110229', '延慶縣', '110000'); INSERT INTO `city` VALUES ('11010019', '110230', '其它區', '110000'); INSERT INTO `city` VALUES ('12010021', '120103', '河西區', '120000'); INSERT INTO `city` VALUES ('12010022', '120104', '南開區', '120000'); INSERT INTO `city` VALUES ('12010023', '120105', '河北區', '120000'); INSERT INTO `city` VALUES ('12010024', '120106', '紅橋區', '120000'); INSERT INTO `city` VALUES ('12010025', '120107', '塘沽區', '120000'); INSERT INTO `city` VALUES ('12010026', '120108', '漢沽區', '120000'); INSERT INTO `city` VALUES ('12010027', '120109', '大港區', '120000'); INSERT INTO `city` VALUES ('12010028', '120110', '東麗區', '120000'); INSERT INTO `city` VALUES ('12010029', '120111', '西青區', '120000'); INSERT INTO `city` VALUES ('12010030', '120112', '津南區', '120000'); INSERT INTO `city` VALUES ('12010031', '120113', '北辰區', '120000'); INSERT INTO `city` VALUES ('12010032', '120114', '武清區', '120000'); INSERT INTO `city` VALUES ('12010033', '120115', '寶坻區', '120000'); INSERT INTO `city` VALUES ('12010034', '120221', '寧河縣', '120000'); INSERT INTO `city` VALUES ('12010035', '120223', '靜海縣', '120000'); INSERT INTO `city` VALUES ('12010036', '120225', '薊 縣', '120000'); INSERT INTO `city` VALUES ('310100785', '310104', '徐彙區', '310000'); INSERT INTO `city` VALUES ('310100786', '310105', '長寧區', '310000'); INSERT INTO `city` VALUES ('310100787', '310106', '靜安區', '310000'); INSERT INTO `city` VALUES ('310100788', '310107', '普陀區', '310000'); INSERT INTO `city` VALUES ('310100789', '310108', '閘北區', '310000'); INSERT INTO `city` VALUES ('310100790', '310109', '虹口區', '310000'); INSERT INTO `city` VALUES ('310100791', '310110', '楊浦區', '310000'); INSERT INTO `city` VALUES ('310100792', '310112', '閔行區', '310000'); INSERT INTO `city` VALUES ('310100793', '310113', '寶山區', '310000'); INSERT INTO `city` VALUES ('310100794', '310114', '嘉定區', '310000'); INSERT INTO `city` VALUES ('310100795', '310115', '浦東新區', '310000'); INSERT INTO `city` VALUES ('310100796', '310116', '金山區', '310000'); INSERT INTO `city` VALUES ('310100797', '310117', '松江區', '310000'); INSERT INTO `city` VALUES ('310100798', '310118', '青浦區', '310000'); INSERT INTO `city` VALUES ('310100799', '310119', '南匯區', '310000'); INSERT INTO `city` VALUES ('310100800', '310120', '奉賢區', '310000'); INSERT INTO `city` VALUES ('310100801', '310230', '崇明縣', '310000'); INSERT INTO `city` VALUES ('310100802', '310231', '其它區', '310000'); INSERT INTO `city` VALUES ('50002221', '500500104', '大渡口區', '500000'); INSERT INTO `city` VALUES ('50002222', '500500105', '江北區', '500000'); INSERT INTO `city` VALUES ('50002223', '500500106', '沙坪壩區', '500000'); INSERT INTO `city` VALUES ('50002224', '500500107', '九龍坡區', '500000'); INSERT INTO `city` VALUES ('50002225', '500500108', '南岸區', '500000'); INSERT INTO `city` VALUES ('50002226', '500500109', '北碚區', '500000'); INSERT INTO `city` VALUES ('50002227', '500500110', '萬盛區', '500000'); INSERT INTO `city` VALUES ('50002228', '500500111', '雙橋區', '500000'); INSERT INTO `city` VALUES ('50002229', '500500112', '渝北區', '500000'); INSERT INTO `city` VALUES ('50002230', '500500113', '巴南區', '500000'); INSERT INTO `city` VALUES ('50002231', '500500114', '黔江區', '500000'); INSERT INTO `city` VALUES ('50002232', '500500115', '長壽區', '500000'); INSERT INTO `city` VALUES ('50002233', '500500222', '綦江縣', '500000'); INSERT INTO `city` VALUES ('50002234', '500500223', '潼南縣', '500000'); INSERT INTO `city` VALUES ('50002235', '500500224', '銅梁縣', '500000'); INSERT INTO `city` VALUES ('50002236', '500500225', '大足縣', '500000'); INSERT INTO `city` VALUES ('50002237', '500500226', '榮昌縣', '500000'); INSERT INTO `city` VALUES ('50002238', '500500227', '璧山縣', '500000'); INSERT INTO `city` VALUES ('50002239', '500500228', '梁平縣', '500000'); INSERT INTO `city` VALUES ('50002240', '500500229', '城口縣', '500000'); INSERT INTO `city` VALUES ('50002241', '500500230', '豐都縣', '500000'); INSERT INTO `city` VALUES ('50002242', '500500231', '墊江縣', '500000'); INSERT INTO `city` VALUES ('50002243', '500500232', '武隆縣', '500000'); INSERT INTO `city` VALUES ('50002244', '500500233', '忠 縣', '500000'); INSERT INTO `city` VALUES ('50002245', '500500234', '開 縣', '500000'); INSERT INTO `city` VALUES ('50002246', '500500235', '雲陽縣', '500000'); INSERT INTO `city` VALUES ('50002247', '500500236', '奉節縣', '500000'); INSERT INTO `city` VALUES ('50002248', '500500237', '巫山縣', '500000'); INSERT INTO `city` VALUES ('50002249', '500500238', '巫溪縣', '500000'); INSERT INTO `city` VALUES ('50002250', '500500239', '其它區', '500000');