因为工作项目需求,需要一个城市县区数据表
特拿出来和大家分享。
sql 数据方面导入操作
下载在址:
http://download.csdn.net/detail/fkedwgwy/3757518
/**********创建省级表**********/
CREATE TABLE T_Province
(
ProID INT IDENTITY(1,1) PRIMARY KEY, --省份主键
ProName NVARCHAR(50) NOT NULL, --省份名称
ProSort INT, --省份排序
ProRemark NVARCHAR(50) --说明
)
Go
insert T_Province(ProName,ProSort,ProRemark) Values('北京市','1','直辖市')
insert T_Province(ProName,ProSort,ProRemark) Values('天津市','2','直辖市')
insert T_Province(ProName,ProSort,ProRemark) Values('河北省','5','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('山西省','6','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('内蒙古自治区','32','自治区')
insert T_Province(ProName,ProSort,ProRemark) Values('辽宁省','8','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('吉林省','9','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('黑龙江省','10','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('上海市','3','直辖市')
insert T_Province(ProName,ProSort,ProRemark) Values('江苏省','11','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('浙江省','12','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('安徽省','13','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('福建省','14','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('江西省','15','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('山东省','16','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('河南省','17','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('湖北省','18','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('湖南省','19','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('广东省','20','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('海南省','24','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('广西壮族自治区','28','自治区')
insert T_Province(ProName,ProSort,ProRemark) Values('甘肃省','21','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('陕西省','27','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('新 疆维吾尔自治区','31','自治区')
insert T_Province(ProName,ProSort,ProRemark) Values('青海省','26','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('宁夏回族自治区','30','自治区')
insert T_Province(ProName,ProSort,ProRemark) Values('重庆市','4','直辖市')
insert T_Province(ProName,ProSort,ProRemark) Values('四川省','22','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('贵州省','23','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('云南省','25','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('西藏自治区','29','自治区')
insert T_Province(ProName,ProSort,ProRemark) Values('台湾省','7','省份')
insert T_Province(ProName,ProSort,ProRemark) Values('澳门特别行政区','33','特别行政区')
insert T_Province(ProName,ProSort,ProRemark) Values('香港特别行政区','34','特别行政区')
/********创建市级表********/
CREATE TABLE T_City
(
CityID INT IDENTITY(1,1) Primary KEY , --城市主键
CityName NVARCHAR(50) NOT NULL,--城市名称
ProID INT, --所属省份
CitySort INT --城市排序
)
INSERT T_City(CityName,ProID,CitySort) Values('北京市','1','1')
INSERT T_City(CityName,ProID,CitySort) Values('天津市','2','2')
INSERT T_City(CityName,ProID,CitySort) Values('上海市','9','3')
INSERT T_City(CityName,ProID,CitySort) Values('重庆市','27','4')
INSERT T_City(CityName,ProID,CitySort) Values('邯郸市','3','5')
INSERT T_City(CityName,ProID,CitySort) Values('石家庄市','3','6')
INSERT T_City(CityName,ProID,CitySort) Values('保定市','3','7')
INSERT T_City(CityName,ProID,CitySort) Values('张家口市','3','8')
INSERT T_City(CityName,ProID,CitySort) Values('承德市','3','9')
INSERT T_City(CityName,ProID,CitySort) Values('唐山市','3','10')
INSERT T_City(CityName,ProID,CitySort) Values('廊坊市','3','11')
INSERT T_City(CityName,ProID,CitySort) Values('沧州市','3','12')
INSERT T_City(CityName,ProID,CitySort) Values('衡水市','3','13')
INSERT T_City(CityName,ProID,CitySort) Values('邢台市','3','14')
INSERT T_City(CityName,ProID,CitySort) Values('秦皇<script type="text/javascript"><!--mce:0--></script><script type="text/javascript"><!--mce:1--></script><script type="text/javascript"><!--mce:2--></script><script type="text/javascript"><!--mce:3--></script><script type="text/javascript"><!--mce:4--></script>岛市','3','15')
INSERT T_City(CityName,ProID,CitySort) Values('朔州市','4','16')
INSERT T_City(CityName,ProID,CitySort) Values('忻州市','4','17')
INSERT T_City(CityName,ProID,CitySort) Values('太原市','4','18')
INSERT T_City(CityName,ProID,CitySort) Values('大同市','4','19')
INSERT T_City(CityName,ProID,CitySort) Values('阳泉市','4','20')
INSERT T_City(CityName,ProID,CitySort) Values('晋中市','4','21')
INSERT T_City(CityName,ProID,CitySort) Values('长治市','4','22')
INSERT T_City(CityName,ProID,CitySort) Values('晋城市','4','23')
INSERT T_City(CityName,ProID,CitySort) Values('临汾市','4','24')
INSERT T_City(CityName,ProID,CitySort) Values('吕梁市','4','25')
INSERT T_City(CityName,ProID,CitySort) Values('运城市','4','26')
INSERT T_City(CityName,ProID,CitySort) Values('沈阳市','6','27')
INSERT T_City(CityName,ProID,CitySort) Values('铁岭市','6','28')
INSERT T_City(CityName,ProID,CitySort) Values('大连市','6','29')
INSERT T_City(CityName,ProID,CitySort) Values('鞍山市','6','30')
INSERT T_City(CityName,ProID,CitySort) Values('抚顺市','6','31')
INSERT T_City(CityName,ProID,CitySort) Values('本溪市','6','32')
INSERT T_City(CityName,ProID,CitySort) Values('丹东市','6','33')
INSERT T_City(CityName,ProID,CitySort) Values('锦州市','6','34')
INSERT T_City(CityName,ProID,CitySort) Values('营口市','6','35')
INSERT T_City(CityName,ProID,CitySort) Values('阜新市','6','36')
INSERT T_City(CityName,ProID,CitySort) Values('辽阳市','6','37')
INSERT T_City(CityName,ProID,CitySort) Values('朝阳市','6','38')
INSERT T_C