时间:2021-07-01 10:21:17 帮助过:15人阅读
2:市
create table CREATE TABLE `cities` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT ‘主键‘, `cityid` char(6) NOT NULL COMMENT ‘城市编码‘, `city` varchar(40) NOT NULL COMMENT ‘城市名称‘, `provinceid` char(6) NOT NULL COMMENT ‘所属省份编码‘, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=346 DEFAULT CHARSET=utf8 COMMENT=‘城市信息表‘
2:区
create table CREATE TABLE `areas` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT ‘主键‘, `areaid` char(6) NOT NULL COMMENT ‘区县编码‘, `area` varchar(40) NOT NULL COMMENT ‘区县名称‘, `cityid` char(6) NOT NULL COMMENT ‘所属城市编码‘, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3145 DEFAULT CHARSET=utf8 COMMENT=‘区县信息表‘
二:新增数据
1:省
INSERT INTO `provinces` VALUES (‘1‘, ‘110000‘, ‘北京市‘); INSERT INTO `provinces` VALUES (‘2‘, ‘120000‘, ‘天津市‘); INSERT INTO `provinces` VALUES (‘3‘, ‘130000‘, ‘河北省‘); INSERT INTO `provinces` VALUES (‘4‘, ‘140000‘, ‘山西省‘); INSERT INTO `provinces` VALUES (‘5‘, ‘150000‘, ‘内蒙古自治区‘); INSERT INTO `provinces` VALUES (‘6‘, ‘210000‘, ‘辽宁省‘); INSERT INTO `provinces` VALUES (‘7‘, ‘220000‘, ‘吉林省‘); INSERT INTO `provinces` VALUES (‘8‘, ‘230000‘, ‘黑龙江省‘); INSERT INTO `provinces` VALUES (‘9‘, ‘310000‘, ‘上海市‘); INSERT INTO `provinces` VALUES (‘10‘, ‘320000‘, ‘江苏省‘); INSERT INTO `provinces` VALUES (‘11‘, ‘330000‘, ‘浙江省‘); INSERT INTO `provinces` VALUES (‘12‘, ‘340000‘, ‘安徽省‘); INSERT INTO `provinces` VALUES (‘13‘, ‘350000‘, ‘福建省‘); INSERT INTO `provinces` VALUES (‘14‘, ‘360000‘, ‘江西省‘); INSERT INTO `provinces` VALUES (‘15‘, ‘370000‘, ‘山东省‘); INSERT INTO `provinces` VALUES (‘16‘, ‘410000‘, ‘河南省‘); INSERT INTO `provinces` VALUES (‘17‘, ‘420000‘, ‘湖北省‘); INSERT INTO `provinces` VALUES (‘18‘, ‘430000‘, ‘湖南省‘); INSERT INTO `provinces` VALUES (‘19‘, ‘440000‘, ‘广东省‘); INSERT INTO `provinces` VALUES (‘20‘, ‘450000‘, ‘广西壮族自治区‘); INSERT INTO `provinces` VALUES (‘21‘, ‘460000‘, ‘海南省‘); INSERT INTO `provinces` VALUES (‘22‘, ‘500000‘, ‘重庆市‘); INSERT INTO `provinces` VALUES (‘23‘, ‘510000‘, ‘四川省‘); INSERT INTO `provinces` VALUES (‘24‘, ‘520000‘, ‘贵州省‘); INSERT INTO `provinces` VALUES (‘25‘, ‘530000‘, ‘云南省‘); INSERT INTO `provinces` VALUES (‘26‘, ‘540000‘, ‘西藏自治区‘); INSERT INTO `provinces` VALUES (‘27‘, ‘610000‘, ‘陕西省‘); INSERT INTO `provinces` VALUES (‘28‘, ‘620000‘, ‘甘肃省‘); INSERT INTO `provinces` VALUES (‘29‘, ‘630000‘, ‘青海省‘); INSERT INTO `provinces` VALUES (‘30‘, ‘640000‘, ‘宁夏回族自治区‘); INSERT INTO `provinces` VALUES (‘31‘, ‘650000‘, ‘新疆维吾尔自治区‘); INSERT INTO `provinces` VALUES (‘32‘, ‘710000‘, ‘台湾省‘); INSERT INTO `provinces` VALUES (‘33‘, ‘810000‘, ‘香港特别行政区‘); INSERT INTO `provinces` VALUES (‘34‘, ‘820000‘, ‘澳门特别行政区‘);
2:市
INSERT INTO `cities` VALUES (‘1‘, ‘110100‘, ‘北京市‘, ‘110000‘); INSERT INTO `cities` VALUES (‘2‘, ‘1102xx‘, ‘北京下属县‘, ‘1100xx‘); INSERT INTO `cities` VALUES (‘3‘, ‘120100‘, ‘天津市‘, ‘120000‘); INSERT INTO `cities` VALUES (‘4‘, ‘1202xx‘, ‘天津下属县‘, ‘1200xx‘); INSERT INTO `cities` VALUES (‘5‘, ‘130100‘, ‘石家庄市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘6‘, ‘130200‘, ‘唐山市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘7‘, ‘130300‘, ‘秦皇岛市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘8‘, ‘130400‘, ‘邯郸市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘9‘, ‘130500‘, ‘邢台市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘10‘, ‘130600‘, ‘保定市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘11‘, ‘130700‘, ‘张家口市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘12‘, ‘130800‘, ‘承德市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘13‘, ‘130900‘, ‘沧州市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘14‘, ‘131000‘, ‘廊坊市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘15‘, ‘131100‘, ‘衡水市‘, ‘130000‘); INSERT INTO `cities` VALUES (‘16‘, ‘140100‘, ‘太原市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘17‘, ‘140200‘, ‘大同市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘18‘, ‘140300‘, ‘阳泉市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘19‘, ‘140400‘, ‘长治市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘20‘, ‘140500‘, ‘晋城市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘21‘, ‘140600‘, ‘朔州市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘22‘, ‘140700‘, ‘晋中市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘23‘, ‘140800‘, ‘运城市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘24‘, ‘140900‘, ‘忻州市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘25‘, ‘141000‘, ‘临汾市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘26‘, ‘141100‘, ‘吕梁市‘, ‘140000‘); INSERT INTO `cities` VALUES (‘27‘, ‘150100‘, ‘呼和浩特市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘28‘, ‘150200‘, ‘包头市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘29‘, ‘150300‘, ‘乌海市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘30‘, ‘150400‘, ‘赤峰市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘31‘, ‘150500‘, ‘通辽市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘32‘, ‘150600‘, ‘鄂尔多斯市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘33‘, ‘150700‘, ‘呼伦贝尔市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘34‘, ‘150800‘, ‘巴彦淖尔市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘35‘, ‘150900‘, ‘乌兰察布市‘, ‘150000‘); INSERT INTO `cities` VALUES (‘36‘, ‘152200‘, ‘兴安盟‘, ‘150000‘); INSERT INTO `cities` VALUES (‘37‘, ‘152500‘, ‘锡林郭勒盟‘, ‘150000‘); INSERT INTO `cities` VALUES (‘38‘, ‘152900‘, ‘阿拉善盟‘, ‘150000‘); INSERT INTO `cities` VALUES (‘39‘, ‘210100‘, ‘沈阳市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘40‘, ‘210200‘, ‘大连市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘41‘, ‘210300‘, ‘鞍山市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘42‘, ‘210400‘, ‘抚顺市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘43‘, ‘210500‘, ‘本溪市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘44‘, ‘210600‘, ‘丹东市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘45‘, ‘210700‘, ‘锦州市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘46‘, ‘210800‘, ‘营口市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘47‘, ‘210900‘, ‘阜新市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘48‘, ‘211000‘, ‘辽阳市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘49‘, ‘211100‘, ‘盘锦市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘50‘, ‘211200‘, ‘铁岭市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘51‘, ‘211300‘, ‘朝阳市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘52‘, ‘211400‘, ‘葫芦岛市‘, ‘210000‘); INSERT INTO `cities` VALUES (‘53‘, ‘220100‘, ‘长春市‘, ‘220000‘); INSERT INTO `cities` VALUES (‘54‘, ‘220200‘, ‘吉林市‘, ‘220000‘); INSERT INTO `cities` VALUES (‘55‘, ‘220300‘, ‘四平市‘, ‘220000‘); INSERT INTO `cities` VALUES (‘56‘, ‘220400‘, ‘辽源市‘, ‘220000‘); INSERT INTO `cities` VALUES (‘57‘, ‘220500‘, ‘通化市‘, ‘220000‘); INSERT INTO `cities` VALUES (‘58‘, ‘220600‘, ‘白山市‘, ‘220000‘); INSERT INTO `cities` VALUES (‘59‘, ‘220700‘, ‘松原市‘, ‘220000‘); INSERT INTO `cities` VALUES (‘60‘, ‘220800‘, ‘白城市‘, ‘220000‘); INSERT INTO `cities` VALUES (‘61‘, ‘222400‘, ‘延边朝鲜族自治州‘, ‘220000‘); INSERT INTO `cities` VALUES (‘62‘, ‘230100‘, ‘哈尔滨市‘, ‘