最新行政区划编码数据
行政区划的数据来源:国家统计局(截止2011年10月31日)
参考网址:http://www.stats.gov.cn/tjbz/xzqhdm/t20120105_402777427.htm
国家统计局给出的数据是网页格式的,如果需要把这些数据收纳到项目中来,需要费点儿周折。我用HttpClient工具读取了网页的内容,然后经过简单的分析拼接,最后得到了SQL脚本,SQL脚本的内容如下:
注:本贴中的数据只限学习交流用,因此而引起的任何法律责任和纠纷均和作者无关。如需转帖,请注明出处。
1 -- ---------------------
2 -- 行政区划临时表
3 -- @author Programmer.Wenlong
4 -- @since 2012-03-09
5 -- ---------------------
6 create table temp(
7 code varchar(8),
8 name varchar(32),
9 primary key(code)
10 );
11
12 insert into temp(code,name) values('110000','北京市');
13 insert into temp(code,name) values('110100','市辖区');
14 insert into temp(code,name) values('110101','东城区');
15 insert into temp(code,name) values('110102','西城区');
16 insert into temp(code,name) values('110105','朝阳区');
17 insert into temp(code,name) values('110106','丰台区');
18 insert into temp(code,name) values('110107','石景山区');
19 insert into temp(code,name) values('110108','海淀区');
20 insert into temp(code,name) values('110109','门头沟区');
21 insert into temp(code,name) values('110111','房山区');
22 insert into temp(code,name) values('110112','通州区');
23 insert into temp(code,name) values('110113','顺义区');
24 insert into temp(code,name) values('110114','昌平区');
25 insert into temp(code,name) values('110115','大兴区');
26 insert into temp(code,name) values('110116','怀柔区');
27 insert into temp(code,name) values('110117','平谷区');
28 insert into temp(code,name) values('110200','县');
29 insert into temp(code,name) values('110228','密云县');
30 insert into temp(code,name) values('110229','延庆县');
31 insert into temp(code,name) values('120000','天津市');
32 insert into temp(code,name) values('120100','市辖区');
33 insert into temp(code,name) values('120101','和平区');
34 insert into temp(code,name) values('120102','河东区');
35 insert into temp(code,name) values('120103','河西区');
36 insert into temp(code,name) values('120104','南开区');
37 insert into temp(code,name) values('120105','河北区');
38 insert into temp(code,name) values('120106','红桥区');
39 insert into temp(code,name) values('120110','东丽区');
40 insert into temp(code,name) values('120111','西青区');
41 insert into temp(code,name) values('120112','津南区');
42 insert into temp(code,name) values('120113','北辰区');
43 insert into temp(code,name) values('120114','武清区');
44 insert into temp(code,name) values('120115','宝坻区');
45 insert into temp(code,name) values('120116','滨海新区');
46 insert into temp(code,name) values('120200','县');
47 insert into temp(code,name) values('120221','宁河县');
48 insert into temp(code,name) values('120223','静海县');
49 insert into temp(code,name) values('120225','蓟县');
50 insert into temp(code,name) values('130000','河北省');
51 insert into temp(code,name) values('130100','石家庄市');
52 insert into temp(code,name) values('130101','市辖区');
53 insert into temp(code,name) values('130102','长安区');
54 insert into temp(code,name) values('130103','桥东区');
55 insert into temp(code,name) values('130104','桥西区');
56 insert into temp(code,name) values('130105','新华区');
57 insert into temp(code,name) values('130107','井陉矿区');
58 insert into temp(code,name) values('130108','裕华区');
59 insert into temp(code,name) values('130121','井陉县');
60 insert into temp(code,name) values('130123','正定县');
61 insert into temp(code,name) values('130124','栾城县');
62 insert into temp(code,name) values('130125','行唐县');
63 insert into temp(code,name) values('130126','灵寿县');
64 insert into temp(code,name) values('130127','高邑县');
65 insert into temp(code,name) values('130128','深泽县');
66 insert into temp(code,name) values('130129','赞皇县');
67 insert into temp(code,name) values('130130','无极县');
68 insert into temp(code,name) values('130131','平山县');
69 insert into temp(code,name) values('130132','元氏县');
70 insert into temp(code,name) values('130133','赵县');
71 insert into temp(code,name) values('130181','辛集市');
72 insert into temp(code,name) values('130182','藁城市');
73 insert into temp(code,name) values('130183','晋州市');
74 insert into temp(code,name) values('130184','新乐市');
75 insert into temp(code,name) values('130185','鹿泉市');
76 insert into temp(code,name) values('130200','唐山市');
77 insert into temp(code,name) values('130201','市辖区');
78 insert into temp(code,name) values('130202','路南区');
79 insert into temp(code,name) values('130203','路北区');
80 insert into temp(code,name) values('130204','古冶区');
81 insert into temp(code,name) values('130205','开平区');
82 insert into temp(code,name) values('130207','丰南区');
83 insert into temp(code,name) values('130208','丰润区');
84 insert into temp(code,name) values('130223','滦县');
85 insert into temp(code,name) values('130224','滦南县');
86 insert into temp(code,name) values('130225','乐亭县');
87 insert into temp(code,name) values('130227','迁西县');
88 insert into temp(code,name) values('130229','玉田县');
89 insert into temp(code,name) values('130230','唐海县');
90 insert into temp(code,name) values('130281','遵化市');
91 insert into temp(code,name) values('130283','迁安市');
92 insert into temp(code,name) values('130300','秦皇岛市');
93 insert into temp(code,name) values('130301','市辖区');
94 insert into temp(code,name) values('130302','海港区');
95 insert into temp(code,name) values('130303','山海关区');
96 insert into temp(code,name) values('130304','北戴河区');
97 insert into temp(code,name) values('130321','青龙满族自治县');
98 insert into temp(code,name) values('130322','昌黎县');
99 insert into temp(code,name) values('130323','抚宁县');
100 insert into temp(code,name) values('130324','卢龙县');
101 insert into temp(code,name) values('130400','邯郸市');
102 insert into temp(code,name) values('130401','市辖区');
103 insert into temp(code,name) values('130402','邯山区');
104 insert into temp(code,name) values('130403','丛台区');
105 insert into temp(code,name) values('130404','复兴区');
106 insert into temp(code,name) values('130406','峰峰矿区');
107 insert into temp(code,name) values('130421','邯郸县');
108 insert into temp(code,name) values('130423','临漳县');
109 insert into temp(code,name) values('130424','成安县');
110 insert into temp(code,name) values('130425','大名县');
111 insert into temp(code,name) values('130426','涉县');
112 insert into temp(code,name) values('130427','磁县');
113 insert into temp(code,name) values('130428','肥乡县');
114 insert into temp(code,name) values('130429','永年县');
115 insert into temp(code,name) values('130430','邱县');
116 insert into temp(code,name) values('130431','鸡泽县');
117 insert into temp(code,name) values('130432','广平县');
118 insert into temp(code,name) values('130433','馆陶县');
119 insert into temp(code,name) values('130434','魏县');
120 insert into temp(code,name) values('130435','曲周县');
121 insert into temp(code,name) values('130481','武安市');
122 insert into temp(code,name) values('130500','邢台市');
123 insert into temp(code,name) values('130501','市辖区');
124 insert into temp(code,name) values('130502','桥东区');
125 insert into temp(code,name) values('130503','桥西区');
126 insert into temp(code,name) values('130521','邢台县');
127 insert into temp(code,name) values('130522','临城县');
128 insert into temp(code,name) values('130523','内丘县');
129 insert into temp(code,name) values('130524','柏乡县');
130 insert into temp(code,name) values('130525','隆尧县');
131 insert into temp(code,name) values('130526','任县');
132 insert into temp(code,name) values('130527','南和县');
133 insert into temp(code,name) values('130528','宁晋县');
134 insert into temp(code,name) values('130529','巨鹿县');
135 insert into temp(code,name) values('130530','新河县');
136 insert into temp(code,name) values('130531','广宗县');
137 insert into temp(code,name) values('130532','平乡县');
138 insert into temp(code,name) values('130533','威县');
139 insert into temp(code,name) values('130534','清河县');
140 insert into temp(code,name) values('130535','临西县');
141 insert into temp(code,name) values('130581','南宫市');
142 insert into temp(code,name) values('130582','沙河市');
143 insert into temp(code,name) values('130600','保定市');
144 insert into temp(code,name) values('130601','市辖区');
145 insert into temp(code,name) values('130602','新市区');
146 insert into temp(code,name) values('130603','北市区');
147 insert into temp(code,name) values('130604','南市区');
148 insert into temp(code,name) values('130621','满城县');
149 insert into temp(code,name) values('130622','清苑县');
150 insert into temp(code,name) values('130623','涞水县');
151 insert into temp(code,name) values('130624','阜平县');
152 insert into temp(code,name) values('130625','徐水县');
153 insert into temp(code,name) values('130626','定兴县');
154 insert into temp(code,name) values('130627','唐县');
因数据较多,我已上传至http://download.csdn.net/detail/mycdsnstudy/4129537
当然,不同级别的行政区划之间还存在关联关系。只要把源数据导入到数据库中,剩的工作就相对简单了。