CREATE TABLE `region` (
`id` mediumint(7) unsigned NOT NULL AUTO_INCREMENT,
`level` tinyint(1) unsigned NOT NULL COMMENT '层级',
`parent_code` bigint(14) unsigned NOT NULL DEFAULT '0' COMMENT '父级行政代码',
`area_code` bigint(14) unsigned NOT NULL DEFAULT '0' COMMENT '行政代码',
`zip_code` mediumint(6) unsigned zerofill NOT NULL DEFAULT '000000' COMMENT '邮政编码',
`city_code` char(6) NOT NULL DEFAULT '' COMMENT '区号',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
`short_name` varchar(50) NOT NULL DEFAULT '' COMMENT '简称',
`merger_name` varchar(50) NOT NULL DEFAULT '' COMMENT '组合名',
`pinyin` varchar(30) NOT NULL DEFAULT '' COMMENT '拼音',
`lng` decimal(10,6) NOT NULL DEFAULT '0.000000' COMMENT '经度',
`lat` decimal(10,6) NOT NULL DEFAULT '0.000000' COMMENT '纬度',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `uk_code` (`area_code`) USING BTREE,
KEY `idx_parent_code` (`parent_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=758050 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='中国行政地区表';
INSERT INTO `region` VALUES (1, 0, 0, 110000000000, 000000, '', '北京市', '北京', '北京', 'BeiJing', 116.407526, 39.904030);
INSERT INTO `region` VALUES (2, 1, 110000000000, 110100000000, 100000, '010', '直辖区', '北京', '北京', 'BeiJing', 116.407526, 39.904030);
INSERT INTO `region` VALUES (3, 2, 110100000000, 110101000000, 100000, '010', '东城区', '东城', '北京,东城', 'DongCheng', 116.416357, 39.928353);