Cities and counties data sources Google Maps. (including 34 provinces, 371 municipalities, 2,824 County districts)
Copy Code code as follows:
/********** Create provincial table **********/
CREATE TABLE t_province
(
Proid INT IDENTITY (1,1) PRIMARY key,--province primary key
Proname NVARCHAR not NULL,--province name
ProSORT INT,--provincial sort
Proremark NVARCHAR (50)--Description
)
Go
Copy Code code as follows:
/******** create a city-level table ********/
CREATE TABLE t_city
(
Cityid INT IDENTITY (1,1) Primary key,--City primary key
CityName NVARCHAR not NULL,--City name
Proid INT,--affiliation province
Citysort INT--City sort
)
Copy Code code as follows:
/********* City County District table *********/
CREATE TABLE t_district
(
Id INT IDENTITY (1,1) PRIMARY KEY,
Disname NVARCHAR not NULL,--county name
Cityid INT not NULL,--owned city
Dissort INT--sorting of counties
)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.