2021年全国最新地区数据sql文件五级联动,含层级结构和坐标。保证可用。 CREATE TABLE `areas` ( `ID` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '区划ID', `ParentId` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '父ID', `LevelType` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '级别', `Name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '全称', `ShortName` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '简称', `ParentPath` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'ID路径 (110000,110100,110105)', `Province` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '省份全称', `City` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '城市全称', `District` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '县区全称', `ProvinceShortName` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '省份简称', `CityShortName` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '城市简称', `DistrictShortName` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '县区简称', `ProvincePinyin` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '省份拼音', `CityPinyin` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '城市拼音', `DistrictPinyin` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '县区拼音', `CityCode` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '拼音', `ZipCode` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '简拼', `Pinyin` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_un
DROP TABLE IF EXISTS `area`; CREATE TABLE `area` ( `id` bigint(20) NOT NULL COMMENT 'ID', `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '区域名称', `pid` bigint(20) NOT NULL COMMENT '父ID', `level` int(11) NOT NULL COMMENT '级别:1-省,2-市,3-区,4-乡镇', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '行政区域表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of area -- ---------------------------- INSERT INTO `area` VALUES (110000000000, '北京市', 0, 1); INSERT INTO `area` VALUES (110100000000, '市辖区', 110000000000, 2); INSERT INTO `area` VALUES (110101000000, '东城区', 110100000000, 3); INSERT INTO `area` VALUES (110101001000, '东华门街道办事处', 110101000000, 4); INSERT INTO `area` VALUES (110101002000, '景山街道办事处', 110101000000, 4); INSERT INTO `area` VALUES (110101003000, '交道口街道办事处', 110101000000, 4); INSERT INTO `area` VALUES (110101004000, '安定门街道办事处', 110101000000, 4); INSERT INTO `area` VALUES (110101005000, '北新桥街道办事处', 110101000000, 4); INSERT INTO `area` VALUES (110101006000, '东四街道办事处', 110101000000, 4);
2021-04-29 01:42:28 3.39MB 全国地区sql
1