应一位园子里的朋友的要求,发一下这个数据,所有数据都是本人自己在网上找的,然后整理了一下:
这套数据共包括:
- 省份34个(包括港澳台地区);
- 城市345个(每个城市包括一个可通用的邮政编码);
- 城市对应的地区2862个(这个地区只的是城市中的小的区,比如:北京的海淀区).
SQL版:
SQL脚本下载:点击下载
运行脚本时候将第一行的 USE [DBCT_Dev] 中的 DBCT_Dev 改为要插入数据的数据库名,还可以修改各个表名,默认的表名为:省份[S_Province],城市[S_City],地区[S_District].
XML版:
其实该版本是由上面的数据生成的,不过为了大家的方便也单独放出来,下面的例子数据不全,完整数据XML文件见下方的文件下载:
省份数据:
<?xml version="1.0" encoding="utf-8"?>
<Provinces>
<Province ID="1" ProvinceName="北京市">北京市</Province>
<Province ID="2" ProvinceName="天津市">天津市</Province>
<Province ID="3" ProvinceName="河北省">河北省</Province>
<Province ID="4" ProvinceName="山西省">山西省</Province>
<Province ID="5" ProvinceName="内蒙古自治区">内蒙古自治区</Province>
<Province ID="6" ProvinceName="辽宁省">辽宁省</Province>
<Province ID="7" ProvinceName="吉林省">吉林省</Province>
<Province ID="8" ProvinceName="黑龙江省">黑龙江省</Province>
<Province ID="9" ProvinceName="上海市">上海市</Province>
<Province ID="10" ProvinceName="江苏省">江苏省</Province>
<Province ID="11" ProvinceName="浙江省">浙江省</Province>
<Province ID="12" ProvinceName="安徽省">安徽省</Province>
<Province ID="13" ProvinceName="福建省">福建省</Province>
<Province ID="14" ProvinceName="江西省">江西省</Province>
<Province ID="15" ProvinceName="山东省">山东省</Province>
<Provinces>
<Province ID="1" ProvinceName="北京市">北京市</Province>
<Province ID="2" ProvinceName="天津市">天津市</Province>
<Province ID="3" ProvinceName="河北省">河北省</Province>
<Province ID="4" ProvinceName="山西省">山西省</Province>
<Province ID="5" ProvinceName="内蒙古自治区">内蒙古自治区</Province>
<Province ID="6" ProvinceName="辽宁省">辽宁省</Province>
<Province ID="7" ProvinceName="吉林省">吉林省</Province>
<Province ID="8" ProvinceName="黑龙江省">黑龙江省</Province>
<Province ID="9" ProvinceName="上海市">上海市</Province>
<Province ID="10" ProvinceName="江苏省">江苏省</Province>
<Province ID="11" ProvinceName="浙江省">浙江省</Province>
<Province ID="12" ProvinceName="安徽省">安徽省</Province>
<Province ID="13" ProvinceName="福建省">福建省</Province>
<Province ID="14" ProvinceName="江西省">江西省</Province>
<Province ID="15" ProvinceName="山东省">山东省</Province>
城市数据:
<?xml version="1.0" encoding="utf-8"?>
<Cities>
<City ID="1" CityName="北京市" PID="1" ZipCode="100000">北京市</City>
<City ID="2" CityName="天津市" PID="2" ZipCode="100000">天津市</City>
<City ID="3" CityName="石家庄市" PID="3" ZipCode="050000">石家庄市</City>
<City ID="4" CityName="唐山市" PID="3" ZipCode="063000">唐山市</City>
<City ID="5" CityName="秦皇岛市" PID="3" ZipCode="066000">秦皇岛市</City>
<City ID="6" CityName="邯郸市" PID="3" ZipCode="056000">邯郸市</City>
<City ID="7" CityName="邢台市" PID="3" ZipCode="054000">邢台市</City>
<City ID="8" CityName="保定市" PID="3" ZipCode="071000">保定市</City>
<City ID="9" CityName="张家口市" PID="3" ZipCode="075000">张家口市</City>
<City ID="10" CityName="承德市" PID="3" ZipCode="067000">承德市</City>
<Cities>
<City ID="1" CityName="北京市" PID="1" ZipCode="100000">北京市</City>
<City ID="2" CityName="天津市" PID="2" ZipCode="100000">天津市</City>
<City ID="3" CityName="石家庄市" PID="3" ZipCode="050000">石家庄市</City>
<City ID="4" CityName="唐山市" PID="3" ZipCode="063000">唐山市</City>
<City ID="5" CityName="秦皇岛市" PID="3" ZipCode="066000">秦皇岛市</City>
<City ID="6" CityName="邯郸市" PID="3" ZipCode="056000">邯郸市</City>
<City ID="7" CityName="邢台市" PID="3" ZipCode="054000">邢台市</City>
<City ID="8" CityName="保定市" PID="3" ZipCode="071000">保定市</City>
<City ID="9" CityName="张家口市" PID="3" ZipCode="075000">张家口市</City>
<City ID="10" CityName="承德市" PID="3" ZipCode="067000">承德市</City>
地区数据:
<?xml version="1.0" encoding="utf-8"?>
<Districts>
<District ID="1" DistrictName="东城区" CID="1">东城区</District>
<District ID="2" DistrictName="西城区" CID="1">西城区</District>
<District ID="3" DistrictName="崇文区" CID="1">崇文区</District>
<District ID="4" DistrictName="宣武区" CID="1">宣武区</District>
<District ID="5" DistrictName="朝阳区" CID="1">朝阳区</District>
<District ID="6" DistrictName="丰台区" CID="1">丰台区</District>
<District ID="7" DistrictName="石景山区" CID="1">石景山区</District>
<District ID="8" DistrictName="海淀区" CID="1">海淀区</District>
<District ID="9" DistrictName="门头沟区" CID="1">门头沟区</District>
<District ID="10" DistrictName="房山区" CID="1">房山区</District>
<District ID="11" DistrictName="通州区" CID="1">通州区</District>
<District ID="12" DistrictName="顺义区" CID="1">顺义区</District>
<Districts>
<District ID="1" DistrictName="东城区" CID="1">东城区</District>
<District ID="2" DistrictName="西城区" CID="1">西城区</District>
<District ID="3" DistrictName="崇文区" CID="1">崇文区</District>
<District ID="4" DistrictName="宣武区" CID="1">宣武区</District>
<District ID="5" DistrictName="朝阳区" CID="1">朝阳区</District>
<District ID="6" DistrictName="丰台区" CID="1">丰台区</District>
<District ID="7" DistrictName="石景山区" CID="1">石景山区</District>
<District ID="8" DistrictName="海淀区" CID="1">海淀区</District>
<District ID="9" DistrictName="门头沟区" CID="1">门头沟区</District>
<District ID="10" DistrictName="房山区" CID="1">房山区</District>
<District ID="11" DistrictName="通州区" CID="1">通州区</District>
<District ID="12" DistrictName="顺义区" CID="1">顺义区</District>
完整数据下载:点击下载