/*======================================================
*1.sql server 复制表从一个数据库到另一个数据库
*2.四表联合查询去重复
*3.SQL Server里面导出SQL脚本(表数据的insert语句)
*4.SQL写一个存储过程或者是查询语句,返回本月的天数
*5.SQL根据年份和月份,返回全月所有日期
*6./*国家表*//*省份表*//*城市表*//*区县表*/
*7.SQL取时间部分、SQL取日期部分
*8.Description: 获取指定数据库指定表的字段以及字段长度,字段说明等相关数据信息,便于后期
*开发代码生成器做准备。juser可以换成自己需要查询的表名称 即可
*9.SQL Server中Money转Decimal无损转换
*10.
**(1).查看 SQL 2005 登录帐户所属服务器角色
**(2).SQL 2005 用户所属数据库角色
**(3).查看 SQL 2005 用户被赋予的权限
**(4).查询SQL Server 2005数据库中数据库的最后备份日期
*11.sql server中千万数量级分页存储过程代码
*12.SQL实现显示杨辉三角
*13.
**(1).查询所有触发器
**(2).查询所有索引
**(3).获取只有用户定义的存储过程
*14.
**(1). SQL Server 2005/2008遍历所有表统计行数
**(2).查询所有索引
**(3).获取只有用户定义的存储过程
*15.显示时分表时间
*16.生成300个8位不重复纯数字随机数
*17.获取当前数据库文件等信息
*18.比如:XX_YY_L12
我要得到的字符串是 XX_YY
如何根据
*19.2015-4-11 想变成 150411
*20.sql计算上周日的日期
*21.获取年月日20150604
*22.公共表达式
*23.
/*这个条件中里面的有个102,我查询数据库的时候会把10,
02之类的也查询出来
charindex(b.ITEM_COST_BUDGET ,
'11,50,53,54,59,102')>0
前后,都加一个逗号,就可以了,
大概如下:
charindex( ',' + ltrim(b.ITEM_COST_BUDGET)
+ ',' , ',11,50,53,54,59,102,')>0*/
*24./*小数点前一位大于0就进一位
财务的要求,想多收点客户的钱
比如
212
就得到220
211.5也是220
*/
*25.教循环操作
*26.数据库横转列
*27.取时间最大的一条数据,没有时间的为空
*28.BCP数据库备份成txt文本
*29.语句拼接的时候当遇到日期变量
*30.decimal
*31.取字段[ID]最大的那条数据来统计
*32.出现的数字共出现的次数
*33.动态列的问题
*34.2015年第4季度
*35.多张相同结构的数据表查询
*36.使用存储过程插入insert语句
*37.怎么看数据库版本
*38.SQL SERVER 和EXCEL的数据导入导出
*39.A ,B,C 的分数分别是3,4,5的各有多少
*40.发票号码
*41.本年度数量统计
*42.SID是学生编号
*43.依次往后产生条码
*44.sqlserver中截取字符串的问题
*45.平台0下面的所有归属于平台0的项目
*46.某一列连续出现某个值,求最大连续数
*47.单位表, 产品表, 出库单表, 出库单明细表
*48.横向纵向
*49.已完成
*50.查找出同一天中同一个部门同一组里只有一条记录的行
*51.怎么将此字符串转换成日期型呢
*52.张三
*53.大连,北京,上海
*54.最后使用临时表展示数据结果
*55.查询重复数据
*56.从001开始编号
*57.ABCDE+年份+递增编号
*58.想把产品拆开,并按从左到右的顺序编号
*59.逗号拆分多条数据
*60.现有数据库tableA ,字段(id(int), idate(datetime), iweight(decimal))
*61.true查询方式
*62.判断纵向表中某个字段不存在
*63.数据库中使用正则表达式
*64.四川
*65.数据库中读取某一张表(数据若干),然后将某一字段进行截取
*66.高难度截取字符串
*67.SQL语句将表中的数据导出为xml文件
*68.由于项目需要,需要获取一组数据的的最新一条数据,表结构如下:
*69.一个字段中由字母,数字,中文组成。
*70.想让LEFT(C,1)='-' 的A 和B 字段互换 C的负值变为正数
*71.
1.计算一个月第一天的SQL
2.本周的星期一
3.一年的第一天
4.季度的第一天
5.当天的半夜
6.上个月的最后一天
7.去年的最后一天
8.本月的最后一天
9.本年的最后一天
10.本月的第一个星期一
*72.输出下一个月日期
*73.一张工资表,共两个字段,员工编号和月工资字段
*74.在这张表中找出列col4中为BH的行,接着在找出的记录中分两种情况进行进一步的查找。
*75.多表关联数据相加再汇总
*76.BOM按节点排序应用实例
*77.把表1 字段B 赋值给表2 G字段
==========================================================*/
/*(1)======================================================
*********sql server 复制表从一个数据库到另一个数据库*******
==========================================================*/
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
select * into Merchant3 from OPENDATASOURCE('SQLOLEDB','Data Source=****.***.**.**;User ID=sasa;Password=sasa!~') .FanliPlat.dbo.Merchant
--opendatasource/openrowset
--SELECT * FROM opendatasource( 'SQLOLEDB ', 'Data Source=ip/ServerName;User ID=登陆名;Password=密码 ' ).test.dbo.roy_ta
SELECT * FROM opendatasource( 'SQLOLEDB ', 'Data Source=*****.*****.**.**;User ID=***;Password=******' ).[***********].dbo.juser
-- ========================================================
------------------------------以上总结时间:2015-05-29 17:49:18
/*(2)======================================================
四表联合查询去重复
==========================================================*/
----------------------------------------------------------------
-- Author :fredrickhu(小F,向高手学习)
-- Date :2014-05-30 15:54:28
-- Version:
-- Microsoft SQL Server 2012 - 11.0.2100.60 (Intel X86)
--
Feb 10 2012 19:13:17
--
Copyright (c) Microsoft Corporation
--
Enterprise Edition: Core-based Licensing on Windows NT 6.1
(Build 7601: Service Pack 1)
--
----------------------------------------------------------------
--> 测试数据:[表1]
if object_id('[表1]') is not null drop table [表1]
go
create table [表1]([col] varchar(1))
insert [表1]
select 'a' union all
select 'b' union all
select 'e' union all
select 'f'
--> 测试数据:[表2]
if object_id('[表2]') is not null drop table [表2]
go
create table [表2]([col] varchar(1))
insert [表2]
select 'b' union all
select 'd' union all
select 'e' union all
select 'd'
--> 测试数据:[表3]
if object_id('[表3]') is not null drop table [表3]
go
create table [表3]([col] varchar(1))
insert [表3]
select 'a' union all
select 'c' union all
select 'd' union all
select 'a'
--> 测试数据:[表4]
if object_id('[表4]') is not null drop table [表4]
go
create table [表4]([col] varchar(1))
insert [表4]
select 'c' union all
select 'a' union all
select 'b' union all
select 'c'
--------------开始查询--------------------------
declare @s varchar(1000)
select @s=isnull(@s+' ' , '')+col from (select * from [表1]
union
select * from [表2]
union
select * from [表3]
union
select * from [表4]) as t
select @s
----------------结果----------------------------
/* ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
a b c d e f
(1 行受影响)
*/
-- ========================================================
/*(3)======================================================
***********SQL Server里面导出SQL脚本(表数据的insert语句)
==========================================================*/
CREATE PROCEDURE dbo.UspOutputData
@tablename sysname
AS
declare @column varchar(1000)
declare @columndata varchar(1000)
declare @sql varchar(4000)
declare @xtype tinyint
declare @name sysname
declare @objectId int
declare @objectname sysname
declare @ident int
set nocount on
set @objectId=object_id(@tablename)
if @objectId is null -- 判断对象是否存在
begin
print 'The object not exists'
return
end
set @objectname=rtrim(object_name(@objectId))
if @objectname is null or charindex(@objectname,@tablename)=0 --此判断不严密
begin
print 'object not in current database'
return
end
if OBJECTPROPERTY(@objectId,'IsTable') < > 1 -- 判断对象是否是table
begin
print 'The object is not table'
return
end
select @ident=status&0x80 from syscolumns where id=@objectid and status&0x80=0x80
if @ident is not null
print 'SET IDENTITY_INSERT '+@TableName+' ON'
declare syscolumns_cursor cursor
for select c.name,c.xtype from syscolumns c where c.id=@objectid order by c.colid
open syscolumns_cursor
set @column=''
set @columndata=''
fetch next from syscolumns_cursor into @name,@xtype
while @@fetch_status < >-1
begin
if @@fetch_status < >-2
begin
if @xtype not in(189,34,35,99,98) --timestamp不需处理,image,text,ntext,sql_variant 暂时不处理
begin
set @column=@column+case when len(@column)=0 then'' else ','end+@name
set @columndata=@columndata+case when len(@columndata)=0 then '' else ','','','
end
+case when @xtype in(167,175) then '''''''''+'+@name+'+''''''''' --varchar,char
when @xtype in(231,239) then '''N''''''+'+@name+'+''''''''' --nvarchar,nchar
when @xtype=61 then '''''''''+convert(char(23),'+@name+',121)+''''''''' --datetime
when @xtype=58 then '''''''''+convert(char(16),'+@name+',120)+''''''''' --smalldatetime
when @xtype=36 then '''''''''+convert(char(36),'+@name+')+''''''''' --uniqueidentifier
else @name end
end
end
fetch next from syscolumns_cursor into @name,@xtype
end
close syscolumns_cursor
deallocate syscolumns_cursor
set @sql='set nocount on select ''insert '+@tablename+'('+@column+') values(''as ''--'','+@columndata+','')'' from '+@tablename
print '--'+@sql
exec(@sql)
if @ident is not null
print 'SET IDENTITY_INSERT '+@TableName+' OFF'
GO
exec UspOutputData juser
-- =========================================================
/*(4)======================================================
--SQL写一个存储过程或者是查询语句,返回本月的天数
==========================================================*/
declare @iDays int
declare @dt varchar(50)
--set @dt=getdate()
set @dt='2015-6-6'
select @iDays=day(dateadd(d,-Day(dateadd(m,1,convert(datetime,@dt))),dateadd(m,1,convert(datetime,@dt))))
print @idays
-- =========================================================
/*(5)======================================================
--SQL根据年份和月份,返回全月所有日期
==========================================================*/
use mallshop
go
DROP PROC PROC_Year_Month_All_Date
go
create PROC PROC_Year_Month_All_Date(
@Year int,
@Month int,
@Msg varchar(30) output
)
as
BEGIN TRANSACTION begin
declare @i datetime
set @i= DateAdd(dd, 0, Cast(ltrim(str(@Year)) + '-' +
ltrim(str(@Month)) + '-' + '01' As DateTime))
DECLARE @Month_All_Date TABLE ([id] int identity(1,1),日期 datetime,星期 char(6))
while(datepart(yy,@i)=@Year AND datepart(mm,@i)=@Month)
begin
insert into @Month_All_Date(日期,星期)
values(CONVERT(VARCHAR(10),@i,120),datename(weekday,CONVERT(VARCHAR(10),@i,120)))
set @i=dateadd(d,1,@i)
end
select * from @Month_All_Date
end
IF @@ERROR<>0 BEGIN ROLLBACK TRANSACTION SET @MSG='获取<<'+ltrim(str(@Year))+'年'+ltrim(str(@Month))+'月>>'+'日期失败?' SELECT @MSG RETURN 1 END ELSE BEGIN COMMIT TRANSACTION SET @MSG='获取<<'+ltrim(str(@Year))+'年'+ltrim(str(@Month))+'月>>'+'日期成功!' SELECT @MSG RETURN 0 END
--测试存储过程
Declare @Year int, @Month Int,@Msg varchar(30)
Select @Year = 2015, @Month =8
execute PROC_Year_Month_All_Date @Year,@Month,@Msg output
-- =========================================================
------------------------------以上总结时间:2015-06-02 20:05:59
/*(6)======================================================
/*国家表*/
==========================================================*/
IF EXISTS(SELECT * FROM sysobjects WHERE name='Nation')
DROP TABLE Nation
CREATE TABLE Nation
(
NID INT IDENTITY(1,1), --自动编号,标识列
Ncode INT, --国家代码
Nname NVARCHAR(30), --国家名称
NrecordCreationDate DATETIME, --记录创建时间
NrecordCreator NVARCHAR(20), --记录创建者
NrecordVersion NVARCHAR(200) --记录版本
)
GO
/*省份表*/
IF EXISTS(SELECT * FROM sysobjects WHERE name='Province')
DROP TABLE Province
GO
CREATE TABLE Province
(
PID INT IDENTITY(1,1), --自动编号,标识列
Pcode INT, --省份代码
Pname NVARCHAR(30), --省份名称
NationCode INT, --国家代码
PrecordCreationDate DATETIME, --记录创建时间
PrecordCreator NVARCHAR(20), --记录创建者
PrecordVersion NVARCHAR(200) --记录版本
)
GO
/*城市表*/
IF EXISTS(SELECT * FROM sysobjects WHERE name='City')
DROP TABLE City
GO
CREATE TABLE City
(
CID INT IDENTITY(1,1), --自动编号,标识列
Ccode INT, --城市代码
Cname NVARCHAR(30), --城市名称
ProvinceCode INT, --省份代码
CrecordCreationDate DATETIME, --记录创建时间
CrecordCreator NVARCHAR(20), --记录创建者
CrecordVersion NVARCHAR(200) --记录版本
)
GO
/*区县表*/
IF EXISTS(SELECT * FROM sysobjects WHERE name='AreaCounty')
DROP TABLE AreaCounty
GO
CREATE TABLE AreaCounty
(
AID INT IDENTITY(1,1), --自动编号,标识列
Acode INT, --区县代码
Aname NVARCHAR(30), --区县名称
CityCode INT, --城市代码
ArecordCreationDate DATETIME, --记录创建时间
ArecordCreator NVARCHAR(20), --记录创建者
ArecordVersion NVARCHAR(200) --记录版本
)
GO
/*添加数据*/
/*添加国家表数据*/
INSERT INTO Nation(Ncode,Nname) VALUES(100000,'中国')
/*添加省份表数据*/
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(110000,'北京市',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(120000,'天津市',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(130000,'河北省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(140000,'山西省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(150000,'内蒙古自治区',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(210000,'辽宁省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(220000,'吉林省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(230000,'黑龙江',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(310000,'上海市',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(320000,'江苏省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(330000,'浙江省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(340000,'安徽省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(350000,'福建省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(360000,'江西省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(370000,'山东省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(410000,'河南省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(420000,'湖北省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(430000,'湖南省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(440000,'广东省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(450000,'广西壮族自治区',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(460000,'海南省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(500000,'重庆市',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(510000,'四川省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(520000,'贵州省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(530000,'云南省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(540000,'西藏自治区',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(610000,'陕西省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(620000,'甘肃省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(630000,'青海省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(640000,'宁夏回族自治区',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(650000,'新疆维吾尔自治区',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(710000,'台湾省',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(810000,'香港特别行政区',100000)
INSERT INTO Province(Pcode,Pname,NationCode) VALUES(820000,'澳门特别行政区',100000)
/*添加城市表数据*/
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(110100,'北京市',110000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130100,'石家庄市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130200,'唐山市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130300,'秦皇岛市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130400,'邯郸市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130500,'邢台市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130600,'保定市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130700,'张家口市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130800,'承德市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(130900,'沧州市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(131000,'廊坊市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(131100,'衡水市',130000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140100,'太原市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140200,'大同市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140300,'阳泉市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140400,'长治市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140500,'晋城市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140600,'朔州市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140700,'晋中市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140800,'运城市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(140900,'忻州市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(141000,'临汾市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(141100,'吕梁市',140000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150100,'呼和浩特市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150200,'包头市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150300,'乌海市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150400,'赤峰市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150500,'通辽市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150600,'鄂尔多斯市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150700,'呼伦贝尔市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150800,'巴彦淖尔市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(150900,'乌兰察布市',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(152200,'兴安盟',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(152500,'锡林郭勒盟',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(152900,'阿拉善盟',150000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210100,'沈阳市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210200,'大连市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210300,'鞍山市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210400,'抚顺市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210500,'本溪市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210600,'丹东市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210700,'锦州市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210800,'营口市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(210900,'阜新市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(211000,'辽阳市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(211100,'盘锦市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(211200,'铁岭市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(211300,'朝阳市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(211400,'葫芦岛市',210000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(220100,'长春市',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(220200,'吉林市',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(220300,'四平市',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(220400,'辽源市',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(220500,'通化市',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(220600,'白山市',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(220700,'松原市',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(220800,'白城市',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(222400,'延边朝鲜族自治州',220000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230100,'哈尔滨市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230200,'齐齐哈尔市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230300,'鸡西市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230400,'鹤岗市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230500,'双鸭山市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230600,'大庆市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230700,'伊春市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230800,'佳木斯市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(230900,'七台河市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(231000,'牡丹江市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(231100,'黑河市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(231200,'绥化市',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(232700,'大兴安岭地区',230000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320100,'南京市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320200,'无锡市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320300,'徐州市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320400,'常州市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320500,'苏州市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320600,'南通市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320700,'连云港市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320800,'淮安市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(320900,'盐城市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(321000,'扬州市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(321100,'镇江市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(321200,'泰州市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(321300,'宿迁市',320000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330100,'杭州市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330200,'宁波市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330300,'温州市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330400,'嘉兴市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330500,'湖州市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330600,'绍兴市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330700,'金华市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330800,'衢州市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(330900,'舟山市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(331000,'台州市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(331100,'丽水市',330000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(340100,'合肥市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(340200,'芜湖市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(340300,'蚌埠市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(340400,'淮南市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(340500,'马鞍山市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(340600,'淮北市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(340700,'铜陵市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(340800,'安庆市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341000,'黄山市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341100,'滁州市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341200,'阜阳市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341300,'宿州市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341400,'巢湖市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341500,'六安市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341600,'亳州市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341700,'池州市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(341800,'宣城市',340000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350100,'福州市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350200,'厦门市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350300,'莆田市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350400,'三明市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350500,'泉州市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350600,'漳州市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350700,'南平市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350800,'龙岩市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(350900,'宁德市',350000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360100,'南昌市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360200,'景德镇市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360300,'萍乡市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360400,'九江市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360500,'新余市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360600,'鹰潭市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360700,'赣州市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360800,'吉安市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(360900,'宜春市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(361000,'抚州市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(361100,'上饶市',360000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370100,'济南市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370200,'青岛市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370300,'淄博市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370400,'枣庄市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370500,'东营市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370600,'烟台市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370700,'潍坊市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370800,'济宁市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(370900,'泰安市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(371000,'威海市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(371100,'日照市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(371200,'莱芜市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(371300,'临沂市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(371400,'德州市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(371500,'聊城市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(371600,'滨州市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(371700,'荷泽市',370000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410100,'郑州市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410200,'开封市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410300,'洛阳市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410400,'平顶山市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410500,'安阳市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410600,'鹤壁市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410700,'新乡市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410800,'焦作市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(410900,'濮阳市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(411000,'许昌市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(411100,'漯河市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(411200,'三门峡市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(411300,'南阳市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(411400,'商丘市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(411500,'信阳市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(411600,'周口市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(411700,'驻马店市',410000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(420100,'武汉市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(420200,'黄石市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(420300,'十堰市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(420500,'宜昌市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(420600,'襄樊市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(420700,'鄂州市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(420800,'荆门市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(420900,'孝感市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(421000,'荆州市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(421100,'黄冈市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(421200,'咸宁市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(421300,'随州市',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(422800,'恩施土家族苗族自治州',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(429000,'省直辖行政单位',420000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430100,'长沙市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430200,'株洲市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430300,'湘潭市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430400,'衡阳市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430500,'邵阳市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430600,'岳阳市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430700,'常德市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430800,'张家界市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(430900,'益阳市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(431000,'郴州市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(431100,'永州市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(431200,'怀化市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(431300,'娄底市',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(433100,'湘西土家族苗族自治州',430000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440100,'广州市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440200,'韶关市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440300,'深圳市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440400,'珠海市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440500,'汕头市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440600,'佛山市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440700,'江门市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440800,'湛江市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(440900,'茂名市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(441200,'肇庆市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(441300,'惠州市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(441400,'梅州市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(441500,'汕尾市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(441600,'河源市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(441700,'阳江市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(441800,'清远市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(441900,'东莞市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(442000,'中山市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(445100,'潮州市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(445200,'揭阳市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(445300,'云浮市',440000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450100,'南宁市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450200,'柳州市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450300,'桂林市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450400,'梧州市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450500,'北海市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450600,'防城港市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450700,'钦州市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450800,'贵港市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(450900,'玉林市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(451000,'百色市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(451100,'贺州市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(451200,'河池市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(451300,'来宾市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(451400,'崇左市',450000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(460100,'海口市',460000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(460200,'三亚市',460000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(469000,'省直辖县级行政单位',460000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(510100,'成都市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(510300,'自贡市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(510400,'攀枝花市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(510500,'泸州市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(510600,'德阳市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(510700,'绵阳市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(510800,'广元市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(510900,'遂宁市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511000,'内江市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511100,'乐山市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511300,'南充市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511400,'眉山市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511500,'宜宾市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511600,'广安市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511700,'达州市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511800,'雅安市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(511900,'巴中市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(512000,'资阳市',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(513200,'阿坝藏族羌族自治州',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(513300,'甘孜藏族自治州',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(513400,'凉山彝族自治州',510000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(520100,'贵阳市',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(520200,'六盘水市',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(520300,'遵义市',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(520400,'安顺市',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(522200,'铜仁地区',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(522300,'黔西南布依族苗族自治州',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(522400,'毕节地区',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(522600,'黔东南苗族侗族自治州',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(522700,'黔南布依族苗族自治州',520000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(530100,'昆明市',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(530300,'曲靖市',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(530400,'玉溪市',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(530500,'保山市',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(530600,'昭通市',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(530700,'丽江市',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(530800,'思茅市',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(530900,'临沧市',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(532300,'楚雄彝族自治州',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(532500,'红河哈尼族彝族自治州',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(532600,'文山壮族苗族自治州',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(532800,'西双版纳傣族自治州',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(532900,'大理白族自治州',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(533100,'德宏傣族景颇族自治州',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(533300,'怒江傈僳族自治州',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(533400,'迪庆藏族自治州',530000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(540100,'拉萨市',540000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(542100,'昌都地区',540000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(542200,'山南地区',540000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(542300,'日喀则地区',540000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(542400,'那曲地区',540000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(542500,'阿里地区',540000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(542600,'林芝地区',540000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610100,'西安市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610200,'铜川市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610300,'宝鸡市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610400,'咸阳市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610500,'渭南市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610600,'延安市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610700,'汉中市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610800,'榆林市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(610900,'安康市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(611000,'商洛市',610000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620100,'兰州市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620200,'嘉峪关市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620300,'金昌市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620400,'白银市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620500,'天水市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620600,'武威市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620700,'张掖市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620800,'平凉市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(620900,'酒泉市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(621000,'庆阳市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(621100,'定西市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(621200,'陇南市',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(622900,'临夏回族自治州',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(623000,'甘南藏族自治州',620000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(630100,'西宁市',630000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(632100,'海东地区',630000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(632200,'海北藏族自治州',630000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(632300,'黄南藏族自治州',630000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(632500,'海南藏族自治州',630000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(632600,'果洛藏族自治州',630000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(632700,'玉树藏族自治州',630000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(632800,'海西蒙古族藏族自治州',630000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(640100,'银川市',640000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(640200,'石嘴山市',640000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(640300,'吴忠市',640000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(640400,'固原市',640000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(640500,'中卫市',640000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(650100,'乌鲁木齐市',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(650200,'克拉玛依市',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(652100,'吐鲁番地区',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(652200,'哈密地区',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(652300,'昌吉回族自治州',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(652700,'博尔塔拉蒙古自治州',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(652800,'巴音郭楞蒙古自治州',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(652900,'阿克苏地区',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(653000,'克孜勒苏柯尔克孜自治州',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(653100,'喀什地区',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(653200,'和田地区',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(654000,'伊犁哈萨克自治州',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(654200,'塔城地区',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(654300,'阿勒泰地区',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(659000,'省直辖行政单位',650000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(120100,'天津市',120000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(310100,'上海市',310000)
INSERT INTO City(Ccode,Cname,ProvinceCode) VALUES(500100,'重庆市',500000)
/*添加区县表数据*/
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110101,'东城区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110102,'西城区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110103,'崇文区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110104,'宣武区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110105,'朝阳区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110106,'丰台区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110107,'石景山区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110108,'海淀区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110109,'门头沟区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110111,'房山区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110112,'通州区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110113,'顺义区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110114,'昌平区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110115,'大兴区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110116,'怀柔区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110117,'平谷区',110100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110228,'密云县',110200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(110229,'延庆县',110200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120101,'和平区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120102,'河东区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120103,'河西区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120104,'南开区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120105,'河北区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120106,'红桥区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120107,'塘沽区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120108,'汉沽区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120109,'大港区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120110,'东丽区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120111,'西青区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120112,'津南区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120113,'北辰区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120114,'武清区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120115,'宝坻区',120100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120221,'宁河县',120200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120223,'静海县',120200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(120225,'蓟县',120200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130101,'市辖区',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130102,'长安区',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130103,'桥东区',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130104,'桥西区',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130105,'新华区',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130107,'井陉矿区',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130108,'裕华区',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130121,'井陉县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130123,'正定县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130124,'栾城县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130125,'行唐县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130126,'灵寿县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130127,'高邑县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130128,'深泽县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130129,'赞皇县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130130,'无极县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130131,'平山县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130132,'元氏县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130133,'赵县',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130181,'辛集市',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130182,'藁城市',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130183,'晋州市',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130184,'新乐市',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130185,'鹿泉市',130100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130201,'市辖区',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130202,'路南区',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130203,'路北区',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130204,'古冶区',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130205,'开平区',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130207,'丰南区',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130208,'丰润区',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130223,'滦县',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130224,'滦南县',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130225,'乐亭县',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130227,'迁西县',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130229,'玉田县',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130230,'唐海县',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130281,'遵化市',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130283,'迁安市',130200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130301,'市辖区',130300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130302,'海港区',130300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130303,'山海关区',130300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130304,'北戴河区',130300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130321,'青龙满族自治县',130300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130322,'昌黎县',130300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130323,'抚宁县',130300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130324,'卢龙县',130300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130401,'市辖区',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130402,'邯山区',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130403,'丛台区',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130404,'复兴区',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130406,'峰峰矿区',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130421,'邯郸县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130423,'临漳县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130424,'成安县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130425,'大名县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130426,'涉县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130427,'磁县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130428,'肥乡县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130429,'永年县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130430,'邱县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130431,'鸡泽县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130432,'广平县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130433,'馆陶县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130434,'魏县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130435,'曲周县',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130481,'武安市',130400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130501,'市辖区',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130502,'桥东区',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130503,'桥西区',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130521,'邢台县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130522,'临城县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130523,'内丘县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130524,'柏乡县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130525,'隆尧县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130526,'任县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130527,'南和县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130528,'宁晋县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130529,'巨鹿县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130530,'新河县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130531,'广宗县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130532,'平乡县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130533,'威县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130534,'清河县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130535,'临西县',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130581,'南宫市',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130582,'沙河市',130500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130601,'市辖区',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130602,'新市区',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130603,'北市区',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130604,'南市区',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130621,'满城县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130622,'清苑县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130623,'涞水县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130624,'阜平县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130625,'徐水县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130626,'定兴县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130627,'唐县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130628,'高阳县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130629,'容城县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130630,'涞源县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130631,'望都县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130632,'安新县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130633,'易县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130634,'曲阳县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130635,'蠡县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130636,'顺平县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130637,'博野县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130638,'雄县',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130681,'涿州市',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130682,'定州市',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130683,'安国市',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130684,'高碑店市',130600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130701,'市辖区',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130702,'桥东区',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130703,'桥西区',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130705,'宣化区',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130706,'下花园区',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130721,'宣化县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130722,'张北县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130723,'康保县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130724,'沽源县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130725,'尚义县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130726,'蔚县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130727,'阳原县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130728,'怀安县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130729,'万全县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130730,'怀来县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130731,'涿鹿县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130732,'赤城县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130733,'崇礼县',130700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130801,'市辖区',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130802,'双桥区',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130803,'双滦区',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130804,'鹰手营子矿区',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130821,'承德县',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130822,'兴隆县',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130823,'平泉县',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130824,'滦平县',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130825,'隆化县',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130826,'丰宁满族自治县',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130827,'宽城满族自治县',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130828,'围场满族蒙古族自治县',130800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130901,'市辖区',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130902,'新华区',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130903,'运河区',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130921,'沧县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130922,'青县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130923,'东光县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130924,'海兴县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130925,'盐山县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130926,'肃宁县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130927,'南皮县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130928,'吴桥县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130929,'献县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130930,'孟村回族自治县',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130981,'泊头市',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130982,'任丘市',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130983,'黄骅市',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(130984,'河间市',130900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131001,'市辖区',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131002,'安次区',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131003,'广阳区',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131022,'固安县',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131023,'永清县',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131024,'香河县',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131025,'大城县',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131026,'文安县',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131028,'大厂回族自治县',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131081,'霸州市',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131082,'三河市',131000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131101,'市辖区',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131102,'桃城区',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131121,'枣强县',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131122,'武邑县',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131123,'武强县',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131124,'饶阳县',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131125,'安平县',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131126,'故城县',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131127,'景县',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131128,'阜城县',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131181,'冀州市',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(131182,'深州市',131100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140101,'市辖区',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140105,'小店区',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140106,'迎泽区',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140107,'杏花岭区',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140108,'尖草坪区',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140109,'万柏林区',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140110,'晋源区',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140121,'清徐县',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140122,'阳曲县',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140123,'娄烦县',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140181,'古交市',140100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140201,'市辖区',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140202,'城区',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140203,'矿区',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140211,'南郊区',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140212,'新荣区',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140221,'阳高县',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140222,'天镇县',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140223,'广灵县',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140224,'灵丘县',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140225,'浑源县',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140226,'左云县',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140227,'大同县',140200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140301,'市辖区',140300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140302,'城区',140300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140303,'矿区',140300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140311,'郊区',140300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140321,'平定县',140300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140322,'盂县',140300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140401,'市辖区',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140402,'城区',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140411,'郊区',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140421,'长治县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140423,'襄垣县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140424,'屯留县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140425,'平顺县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140426,'黎城县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140427,'壶关县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140428,'长子县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140429,'武乡县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140430,'沁县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140431,'沁源县',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140481,'潞城市',140400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140501,'市辖区',140500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140502,'城区',140500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140521,'沁水县',140500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140522,'阳城县',140500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140524,'陵川县',140500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140525,'泽州县',140500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140581,'高平市',140500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140601,'市辖区',140600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140602,'朔城区',140600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140603,'平鲁区',140600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140621,'山阴县',140600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140622,'应县',140600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140623,'右玉县',140600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140624,'怀仁县',140600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140701,'市辖区',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140702,'榆次区',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140721,'榆社县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140722,'左权县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140723,'和顺县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140724,'昔阳县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140725,'寿阳县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140726,'太谷县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140727,'祁县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140728,'平遥县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140729,'灵石县',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140781,'介休市',140700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140801,'市辖区',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140802,'盐湖区',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140821,'临猗县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140822,'万荣县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140823,'闻喜县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140824,'稷山县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140825,'新绛县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140826,'绛县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140827,'垣曲县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140828,'夏县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140829,'平陆县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140830,'芮城县',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140881,'永济市',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140882,'河津市',140800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140901,'市辖区',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140902,'忻府区',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140921,'定襄县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140922,'五台县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140923,'代县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140924,'繁峙县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140925,'宁武县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140926,'静乐县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140927,'神池县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140928,'五寨县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140929,'岢岚县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140930,'河曲县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140931,'保德县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140932,'偏关县',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(140981,'原平市',140900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141001,'市辖区',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141002,'尧都区',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141021,'曲沃县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141022,'翼城县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141023,'襄汾县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141024,'洪洞县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141025,'古县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141026,'安泽县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141027,'浮山县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141028,'吉县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141029,'乡宁县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141030,'大宁县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141031,'隰县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141032,'永和县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141033,'蒲县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141034,'汾西县',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141081,'侯马市',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141082,'霍州市',141000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141101,'市辖区',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141102,'离石区',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141121,'文水县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141122,'交城县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141123,'兴县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141124,'临县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141125,'柳林县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141126,'石楼县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141127,'岚县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141128,'方山县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141129,'中阳县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141130,'交口县',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141181,'孝义市',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(141182,'汾阳市',141100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150101,'市辖区',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150102,'新城区',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150103,'回民区',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150104,'玉泉区',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150105,'赛罕区',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150121,'土默特左旗',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150122,'托克托县',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150123,'和林格尔县',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150124,'清水河县',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150125,'武川县',150100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150201,'市辖区',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150202,'东河区',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150203,'昆都仑区',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150204,'青山区',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150205,'石拐区',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150206,'白云矿区',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150207,'九原区',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150221,'土默特右旗',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150222,'固阳县',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150223,'达尔罕茂明安联合旗',150200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150301,'市辖区',150300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150302,'海勃湾区',150300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150303,'海南区',150300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150304,'乌达区',150300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150401,'市辖区',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150402,'红山区',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150403,'元宝山区',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150404,'松山区',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150421,'阿鲁科尔沁旗',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150422,'巴林左旗',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150423,'巴林右旗',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150424,'林西县',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150425,'克什克腾旗',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150426,'翁牛特旗',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150428,'喀喇沁旗',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150429,'宁城县',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150430,'敖汉旗',150400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150501,'市辖区',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150502,'科尔沁区',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150521,'科尔沁左翼中旗',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150522,'科尔沁左翼后旗',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150523,'开鲁县',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150524,'库伦旗',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150525,'奈曼旗',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150526,'扎鲁特旗',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150581,'霍林郭勒市',150500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150602,'东胜区',150600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150621,'达拉特旗',150600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150622,'准格尔旗',150600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150623,'鄂托克前旗',150600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150624,'鄂托克旗',150600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150625,'杭锦旗',150600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150626,'乌审旗',150600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150627,'伊金霍洛旗',150600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150701,'市辖区',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150702,'海拉尔区',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150721,'阿荣旗',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150722,'莫力达瓦达斡尔族自治旗',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150723,'鄂伦春自治旗',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150724,'鄂温克族自治旗',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150725,'陈巴尔虎旗',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150726,'新巴尔虎左旗',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150727,'新巴尔虎右旗',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150781,'满洲里市',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150782,'牙克石市',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150783,'扎兰屯市',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150784,'额尔古纳市',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150785,'根河市',150700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150801,'市辖区',150800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150802,'临河区',150800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150821,'五原县',150800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150822,'磴口县',150800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150823,'乌拉特前旗',150800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150824,'乌拉特中旗',150800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150825,'乌拉特后旗',150800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150826,'杭锦后旗',150800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150901,'市辖区',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150902,'集宁区',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150921,'卓资县',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150922,'化德县',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150923,'商都县',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150924,'兴和县',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150925,'凉城县',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150926,'察哈尔右翼前旗',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150927,'察哈尔右翼中旗',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150928,'察哈尔右翼后旗',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150929,'四子王旗',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(150981,'丰镇市',150900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152201,'乌兰浩特市',152200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152202,'阿尔山市',152200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152221,'科尔沁右翼前旗',152200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152222,'科尔沁右翼中旗',152200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152223,'扎赉特旗',152200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152224,'突泉县',152200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152501,'二连浩特市',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152502,'锡林浩特市',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152522,'阿巴嘎旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152523,'苏尼特左旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152524,'苏尼特右旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152525,'东乌珠穆沁旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152526,'西乌珠穆沁旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152527,'太仆寺旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152528,'镶黄旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152529,'正镶白旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152530,'正蓝旗',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152531,'多伦县',152500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152921,'阿拉善左旗',152900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152922,'阿拉善右旗',152900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(152923,'额济纳旗',152900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210101,'市辖区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210102,'和平区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210103,'沈河区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210104,'大东区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210105,'皇姑区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210106,'铁西区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210111,'苏家屯区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210112,'东陵区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210113,'新城子区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210114,'于洪区',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210122,'辽中县',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210123,'康平县',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210124,'法库县',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210181,'新民市',210100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210201,'市辖区',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210202,'中山区',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210203,'西岗区',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210204,'沙河口区',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210211,'甘井子区',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210212,'旅顺口区',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210213,'金州区',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210224,'长海县',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210281,'瓦房店市',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210282,'普兰店市',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210283,'庄河市',210200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210301,'市辖区',210300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210302,'铁东区',210300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210303,'铁西区',210300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210304,'立山区',210300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210311,'千山区',210300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210321,'台安县',210300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210323,'岫岩满族自治县',210300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210381,'海城市',210300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210401,'市辖区',210400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210402,'新抚区',210400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210403,'东洲区',210400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210404,'望花区',210400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210411,'顺城区',210400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210421,'抚顺县',210400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210422,'新宾满族自治县',210400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210423,'清原满族自治县',210400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210501,'市辖区',210500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210502,'平山区',210500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210503,'溪湖区',210500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210504,'明山区',210500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210505,'南芬区',210500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210521,'本溪满族自治县',210500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210522,'桓仁满族自治县',210500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210601,'市辖区',210600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210602,'元宝区',210600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210603,'振兴区',210600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210604,'振安区',210600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210624,'宽甸满族自治县',210600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210681,'东港市',210600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210682,'凤城市',210600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210701,'市辖区',210700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210702,'古塔区',210700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210703,'凌河区',210700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210711,'太和区',210700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210726,'黑山县',210700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210727,'义县',210700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210781,'凌海市',210700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210782,'北宁市',210700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210801,'市辖区',210800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210802,'站前区',210800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210803,'西市区',210800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210804,'鲅鱼圈区',210800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210811,'老边区',210800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210881,'盖州市',210800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210882,'大石桥市',210800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210901,'市辖区',210900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210902,'海州区',210900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210903,'新邱区',210900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210904,'太平区',210900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210905,'清河门区',210900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210911,'细河区',210900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210921,'阜新蒙古族自治县',210900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(210922,'彰武县',210900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211001,'市辖区',211000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211002,'白塔区',211000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211003,'文圣区',211000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211004,'宏伟区',211000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211005,'弓长岭区',211000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211011,'太子河区',211000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211021,'辽阳县',211000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211081,'灯塔市',211000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211101,'市辖区',211100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211102,'双台子区',211100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211103,'兴隆台区',211100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211121,'大洼县',211100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211122,'盘山县',211100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211201,'市辖区',211200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211202,'银州区',211200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211204,'清河区',211200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211221,'铁岭县',211200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211223,'西丰县',211200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211224,'昌图县',211200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211281,'调兵山市',211200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211282,'开原市',211200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211301,'市辖区',211300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211302,'双塔区',211300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211303,'龙城区',211300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211321,'朝阳县',211300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211322,'建平县',211300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211324,'喀喇沁左翼蒙古族自治县',211300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211381,'北票市',211300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211382,'凌源市',211300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211401,'市辖区',211400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211402,'连山区',211400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211403,'龙港区',211400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211404,'南票区',211400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211421,'绥中县',211400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211422,'建昌县',211400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(211481,'兴城市',211400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220101,'市辖区',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220102,'南关区',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220103,'宽城区',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220104,'朝阳区',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220105,'二道区',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220106,'绿园区',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220112,'双阳区',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220122,'农安县',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220181,'九台市',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220182,'榆树市',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220183,'德惠市',220100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220201,'市辖区',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220202,'昌邑区',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220203,'龙潭区',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220204,'船营区',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220211,'丰满区',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220221,'永吉县',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220281,'蛟河市',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220282,'桦甸市',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220283,'舒兰市',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220284,'磐石市',220200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220301,'市辖区',220300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220302,'铁西区',220300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220303,'铁东区',220300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220322,'梨树县',220300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220323,'伊通满族自治县',220300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220381,'公主岭市',220300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220382,'双辽市',220300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220401,'市辖区',220400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220402,'龙山区',220400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220403,'西安区',220400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220421,'东丰县',220400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220422,'东辽县',220400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220501,'市辖区',220500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220502,'东昌区',220500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220503,'二道江区',220500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220521,'通化县',220500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220523,'辉南县',220500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220524,'柳河县',220500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220581,'梅河口市',220500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220582,'集安市',220500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220601,'市辖区',220600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220602,'八道江区',220600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220621,'抚松县',220600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220622,'靖宇县',220600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220623,'长白朝鲜族自治县',220600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220625,'江源县',220600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220681,'临江市',220600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220701,'市辖区',220700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220702,'宁江区',220700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220721,'前郭尔罗斯蒙古族自治县',220700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220722,'长岭县',220700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220723,'乾安县',220700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220724,'扶余县',220700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220801,'市辖区',220800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220802,'洮北区',220800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220821,'镇赉县',220800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220822,'通榆县',220800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220881,'洮南市',220800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(220882,'大安市',220800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(222401,'延吉市',222400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(222402,'图们市',222400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(222403,'敦化市',222400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(222404,'珲春市',222400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(222405,'龙井市',222400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(222406,'和龙市',222400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(222424,'汪清县',222400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(222426,'安图县',222400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230101,'市辖区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230102,'道里区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230103,'南岗区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230104,'道外区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230106,'香坊区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230107,'动力区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230108,'平房区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230109,'松北区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230111,'呼兰区',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230123,'依兰县',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230124,'方正县',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230125,'宾县',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230126,'巴彦县',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230127,'木兰县',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230128,'通河县',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230129,'延寿县',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230181,'阿城市',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230182,'双城市',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230183,'尚志市',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230184,'五常市',230100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230201,'市辖区',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230202,'龙沙区',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230203,'建华区',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230204,'铁锋区',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230205,'昂昂溪区',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230206,'富拉尔基区',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230207,'碾子山区',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230208,'梅里斯达斡尔族区',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230221,'龙江县',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230223,'依安县',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230224,'泰来县',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230225,'甘南县',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230227,'富裕县',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230229,'克山县',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230230,'克东县',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230231,'拜泉县',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230281,'讷河市',230200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230301,'市辖区',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230302,'鸡冠区',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230303,'恒山区',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230304,'滴道区',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230305,'梨树区',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230306,'城子河区',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230307,'麻山区',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230321,'鸡东县',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230381,'虎林市',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230382,'密山市',230300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230401,'市辖区',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230402,'向阳区',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230403,'工农区',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230404,'南山区',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230405,'兴安区',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230406,'东山区',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230407,'兴山区',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230421,'萝北县',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230422,'绥滨县',230400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230501,'市辖区',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230502,'尖山区',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230503,'岭东区',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230505,'四方台区',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230506,'宝山区',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230521,'集贤县',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230522,'友谊县',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230523,'宝清县',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230524,'饶河县',230500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230601,'市辖区',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230602,'萨尔图区',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230603,'龙凤区',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230604,'让胡路区',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230605,'红岗区',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230606,'大同区',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230621,'肇州县',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230622,'肇源县',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230623,'林甸县',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230624,'杜尔伯特蒙古族自治县',230600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230701,'市辖区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230702,'伊春区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230703,'南岔区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230704,'友好区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230705,'西林区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230706,'翠峦区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230707,'新青区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230708,'美溪区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230709,'金山屯区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230710,'五营区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230711,'乌马河区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230712,'汤旺河区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230713,'带岭区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230714,'乌伊岭区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230715,'红星区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230716,'上甘岭区',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230722,'嘉荫县',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230781,'铁力市',230700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230801,'市辖区',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230802,'永红区',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230803,'向阳区',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230804,'前进区',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230805,'东风区',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230811,'郊区',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230822,'桦南县',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230826,'桦川县',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230828,'汤原县',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230833,'抚远县',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230881,'同江市',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230882,'富锦市',230800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230901,'市辖区',230900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230902,'新兴区',230900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230903,'桃山区',230900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230904,'茄子河区',230900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(230921,'勃利县',230900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231001,'市辖区',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231002,'东安区',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231003,'阳明区',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231004,'爱民区',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231005,'西安区',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231024,'东宁县',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231025,'林口县',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231081,'绥芬河市',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231083,'海林市',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231084,'宁安市',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231085,'穆棱市',231000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231101,'市辖区',231100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231102,'爱辉区',231100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231121,'嫩江县',231100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231123,'逊克县',231100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231124,'孙吴县',231100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231181,'北安市',231100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231182,'五大连池市',231100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231201,'市辖区',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231202,'北林区',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231221,'望奎县',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231222,'兰西县',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231223,'青冈县',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231224,'庆安县',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231225,'明水县',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231226,'绥棱县',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231281,'安达市',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231282,'肇东市',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(231283,'海伦市',231200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(232721,'呼玛县',232700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(232722,'塔河县',232700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(232723,'漠河县',232700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310101,'黄浦区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310103,'卢湾区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310104,'徐汇区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310105,'长宁区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310106,'静安区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310107,'普陀区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310108,'闸北区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310109,'虹口区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310110,'杨浦区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310112,'闵行区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310113,'宝山区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310114,'嘉定区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310115,'浦东新区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310116,'金山区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310117,'松江区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310118,'青浦区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310119,'南汇区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310120,'奉贤区',310100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(310230,'崇明县',310200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320101,'市辖区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320102,'玄武区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320103,'白下区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320104,'秦淮区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320105,'建邺区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320106,'鼓楼区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320107,'下关区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320111,'浦口区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320113,'栖霞区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320114,'雨花台区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320115,'江宁区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320116,'六合区',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320124,'溧水县',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320125,'高淳县',320100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320201,'市辖区',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320202,'崇安区',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320203,'南长区',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320204,'北塘区',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320205,'锡山区',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320206,'惠山区',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320211,'滨湖区',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320281,'江阴市',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320282,'宜兴市',320200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320301,'市辖区',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320302,'鼓楼区',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320303,'云龙区',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320304,'九里区',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320305,'贾汪区',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320311,'泉山区',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320321,'丰县',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320322,'沛县',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320323,'铜山县',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320324,'睢宁县',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320381,'新沂市',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320382,'邳州市',320300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320401,'市辖区',320400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320402,'天宁区',320400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320404,'钟楼区',320400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320405,'戚墅堰区',320400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320411,'新北区',320400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320412,'武进区',320400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320481,'溧阳市',320400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320482,'金坛市',320400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320501,'市辖区',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320502,'沧浪区',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320503,'平江区',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320504,'金阊区',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320505,'虎丘区',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320506,'吴中区',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320507,'相城区',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320581,'常熟市',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320582,'张家港市',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320583,'昆山市',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320584,'吴江市',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320585,'太仓市',320500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320601,'市辖区',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320602,'崇川区',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320611,'港闸区',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320621,'海安县',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320623,'如东县',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320681,'启东市',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320682,'如皋市',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320683,'通州市',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320684,'海门市',320600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320701,'市辖区',320700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320703,'连云区',320700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320705,'新浦区',320700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320706,'海州区',320700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320721,'赣榆县',320700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320722,'东海县',320700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320723,'灌云县',320700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320724,'灌南县',320700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320801,'市辖区',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320802,'清河区',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320803,'楚州区',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320804,'淮阴区',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320811,'清浦区',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320826,'涟水县',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320829,'洪泽县',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320830,'盱眙县',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320831,'金湖县',320800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320901,'市辖区',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320902,'亭湖区',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320903,'盐都区',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320921,'响水县',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320922,'滨海县',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320923,'阜宁县',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320924,'射阳县',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320925,'建湖县',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320981,'东台市',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(320982,'大丰市',320900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321001,'市辖区',321000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321002,'广陵区',321000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321003,'邗江区',321000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321011,'郊区',321000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321023,'宝应县',321000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321081,'仪征市',321000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321084,'高邮市',321000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321088,'江都市',321000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321101,'市辖区',321100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321102,'京口区',321100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321111,'润州区',321100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321112,'丹徒区',321100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321181,'丹阳市',321100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321182,'扬中市',321100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321183,'句容市',321100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321201,'市辖区',321200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321202,'海陵区',321200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321203,'高港区',321200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321281,'兴化市',321200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321282,'靖江市',321200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321283,'泰兴市',321200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321284,'姜堰市',321200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321301,'市辖区',321300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321302,'宿城区',321300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321311,'宿豫区',321300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321322,'沭阳县',321300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321323,'泗阳县',321300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(321324,'泗洪县',321300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330101,'市辖区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330102,'上城区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330103,'下城区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330104,'江干区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330105,'拱墅区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330106,'西湖区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330108,'滨江区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330109,'萧山区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330110,'余杭区',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330122,'桐庐县',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330127,'淳安县',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330182,'建德市',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330183,'富阳市',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330185,'临安市',330100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330201,'市辖区',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330203,'海曙区',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330204,'江东区',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330205,'江北区',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330206,'北仑区',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330211,'镇海区',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330212,'鄞州区',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330225,'象山县',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330226,'宁海县',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330281,'余姚市',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330282,'慈溪市',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330283,'奉化市',330200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330301,'市辖区',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330302,'鹿城区',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330303,'龙湾区',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330304,'瓯海区',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330322,'洞头县',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330324,'永嘉县',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330326,'平阳县',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330327,'苍南县',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330328,'文成县',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330329,'泰顺县',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330381,'瑞安市',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330382,'乐清市',330300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330401,'市辖区',330400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330402,'秀城区',330400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330411,'秀洲区',330400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330421,'嘉善县',330400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330424,'海盐县',330400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330481,'海宁市',330400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330482,'平湖市',330400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330483,'桐乡市',330400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330501,'市辖区',330500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330502,'吴兴区',330500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330503,'南浔区',330500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330521,'德清县',330500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330522,'长兴县',330500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330523,'安吉县',330500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330601,'市辖区',330600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330602,'越城区',330600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330621,'绍兴县',330600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330624,'新昌县',330600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330681,'诸暨市',330600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330682,'上虞市',330600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330683,'嵊州市',330600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330701,'市辖区',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330702,'婺城区',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330703,'金东区',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330723,'武义县',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330726,'浦江县',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330727,'磐安县',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330781,'兰溪市',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330782,'义乌市',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330783,'东阳市',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330784,'永康市',330700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330801,'市辖区',330800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330802,'柯城区',330800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330803,'衢江区',330800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330822,'常山县',330800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330824,'开化县',330800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330825,'龙游县',330800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330881,'江山市',330800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330901,'市辖区',330900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330902,'定海区',330900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330903,'普陀区',330900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330921,'岱山县',330900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(330922,'嵊泗县',330900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331001,'市辖区',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331002,'椒江区',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331003,'黄岩区',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331004,'路桥区',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331021,'玉环县',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331022,'三门县',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331023,'天台县',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331024,'仙居县',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331081,'温岭市',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331082,'临海市',331000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331101,'市辖区',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331102,'莲都区',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331121,'青田县',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331122,'缙云县',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331123,'遂昌县',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331124,'松阳县',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331125,'云和县',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331126,'庆元县',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331127,'景宁畲族自治县',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(331181,'龙泉市',331100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340101,'市辖区',340100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340102,'瑶海区',340100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340103,'庐阳区',340100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340104,'蜀山区',340100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340111,'包河区',340100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340121,'长丰县',340100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340122,'肥东县',340100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340123,'肥西县',340100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340201,'市辖区',340200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340202,'镜湖区',340200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340203,'马塘区',340200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340204,'新芜区',340200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340207,'鸠江区',340200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340221,'芜湖县',340200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340222,'繁昌县',340200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340223,'南陵县',340200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340301,'市辖区',340300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340302,'龙子湖区',340300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340303,'蚌山区',340300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340304,'禹会区',340300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340311,'淮上区',340300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340321,'怀远县',340300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340322,'五河县',340300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340323,'固镇县',340300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340401,'市辖区',340400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340402,'大通区',340400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340403,'田家庵区',340400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340404,'谢家集区',340400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340405,'八公山区',340400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340406,'潘集区',340400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340421,'凤台县',340400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340501,'市辖区',340500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340502,'金家庄区',340500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340503,'花山区',340500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340504,'雨山区',340500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340521,'当涂县',340500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340601,'市辖区',340600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340602,'杜集区',340600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340603,'相山区',340600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340604,'烈山区',340600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340621,'濉溪县',340600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340701,'市辖区',340700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340702,'铜官山区',340700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340703,'狮子山区',340700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340711,'郊区',340700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340721,'铜陵县',340700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340801,'市辖区',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340802,'迎江区',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340803,'大观区',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340811,'郊区',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340822,'怀宁县',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340823,'枞阳县',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340824,'潜山县',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340825,'太湖县',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340826,'宿松县',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340827,'望江县',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340828,'岳西县',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(340881,'桐城市',340800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341001,'市辖区',341000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341002,'屯溪区',341000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341003,'黄山区',341000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341004,'徽州区',341000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341021,'歙县',341000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341022,'休宁县',341000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341023,'黟县',341000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341024,'祁门县',341000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341101,'市辖区',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341102,'琅琊区',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341103,'南谯区',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341122,'来安县',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341124,'全椒县',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341125,'定远县',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341126,'凤阳县',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341181,'天长市',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341182,'明光市',341100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341201,'市辖区',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341202,'颍州区',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341203,'颍东区',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341204,'颍泉区',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341221,'临泉县',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341222,'太和县',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341225,'阜南县',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341226,'颍上县',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341282,'界首市',341200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341301,'市辖区',341300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341302,'墉桥区',341300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341321,'砀山县',341300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341322,'萧县',341300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341323,'灵璧县',341300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341324,'泗县',341300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341401,'市辖区',341400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341402,'居巢区',341400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341421,'庐江县',341400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341422,'无为县',341400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341423,'含山县',341400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341424,'和县',341400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341501,'市辖区',341500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341502,'金安区',341500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341503,'裕安区',341500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341521,'寿县',341500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341522,'霍邱县',341500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341523,'舒城县',341500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341524,'金寨县',341500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341525,'霍山县',341500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341601,'市辖区',341600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341602,'谯城区',341600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341621,'涡阳县',341600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341622,'蒙城县',341600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341623,'利辛县',341600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341701,'市辖区',341700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341702,'贵池区',341700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341721,'东至县',341700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341722,'石台县',341700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341723,'青阳县',341700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341801,'市辖区',341800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341802,'宣州区',341800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341821,'郎溪县',341800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341822,'广德县',341800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341823,'泾县',341800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341824,'绩溪县',341800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341825,'旌德县',341800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(341881,'宁国市',341800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350101,'市辖区',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350102,'鼓楼区',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350103,'台江区',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350104,'仓山区',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350105,'马尾区',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350111,'晋安区',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350121,'闽侯县',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350122,'连江县',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350123,'罗源县',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350124,'闽清县',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350125,'永泰县',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350128,'平潭县',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350181,'福清市',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350182,'长乐市',350100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350201,'市辖区',350200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350203,'思明区',350200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350205,'海沧区',350200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350206,'湖里区',350200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350211,'集美区',350200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350212,'同安区',350200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350213,'翔安区',350200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350301,'市辖区',350300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350302,'城厢区',350300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350303,'涵江区',350300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350304,'荔城区',350300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350305,'秀屿区',350300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350322,'仙游县',350300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350401,'市辖区',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350402,'梅列区',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350403,'三元区',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350421,'明溪县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350423,'清流县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350424,'宁化县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350425,'大田县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350426,'尤溪县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350427,'沙县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350428,'将乐县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350429,'泰宁县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350430,'建宁县',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350481,'永安市',350400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350501,'市辖区',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350502,'鲤城区',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350503,'丰泽区',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350504,'洛江区',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350505,'泉港区',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350521,'惠安县',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350524,'安溪县',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350525,'永春县',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350526,'德化县',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350527,'金门县',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350581,'石狮市',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350582,'晋江市',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350583,'南安市',350500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350601,'市辖区',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350602,'芗城区',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350603,'龙文区',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350622,'云霄县',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350623,'漳浦县',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350624,'诏安县',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350625,'长泰县',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350626,'东山县',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350627,'南靖县',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350628,'平和县',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350629,'华安县',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350681,'龙海市',350600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350701,'市辖区',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350702,'延平区',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350721,'顺昌县',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350722,'浦城县',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350723,'光泽县',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350724,'松溪县',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350725,'政和县',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350781,'邵武市',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350782,'武夷山市',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350783,'建瓯市',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350784,'建阳市',350700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350801,'市辖区',350800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350802,'新罗区',350800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350821,'长汀县',350800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350822,'永定县',350800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350823,'上杭县',350800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350824,'武平县',350800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350825,'连城县',350800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350881,'漳平市',350800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350901,'市辖区',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350902,'蕉城区',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350921,'霞浦县',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350922,'古田县',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350923,'屏南县',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350924,'寿宁县',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350925,'周宁县',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350926,'柘荣县',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350981,'福安市',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(350982,'福鼎市',350900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360101,'市辖区',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360102,'东湖区',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360103,'西湖区',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360104,'青云谱区',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360105,'湾里区',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360111,'青山湖区',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360121,'南昌县',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360122,'新建县',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360123,'安义县',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360124,'进贤县',360100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360201,'市辖区',360200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360202,'昌江区',360200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360203,'珠山区',360200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360222,'浮梁县',360200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360281,'乐平市',360200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360301,'市辖区',360300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360302,'安源区',360300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360313,'湘东区',360300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360321,'莲花县',360300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360322,'上栗县',360300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360323,'芦溪县',360300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360401,'市辖区',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360402,'庐山区',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360403,'浔阳区',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360421,'九江县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360423,'武宁县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360424,'修水县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360425,'永修县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360426,'德安县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360427,'星子县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360428,'都昌县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360429,'湖口县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360430,'彭泽县',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360481,'瑞昌市',360400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360501,'市辖区',360500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360502,'渝水区',360500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360521,'分宜县',360500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360601,'市辖区',360600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360602,'月湖区',360600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360622,'余江县',360600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360681,'贵溪市',360600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360701,'市辖区',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360702,'章贡区',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360721,'赣县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360722,'信丰县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360723,'大余县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360724,'上犹县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360725,'崇义县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360726,'安远县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360727,'龙南县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360728,'定南县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360729,'全南县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360730,'宁都县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360731,'于都县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360732,'兴国县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360733,'会昌县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360734,'寻乌县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360735,'石城县',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360781,'瑞金市',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360782,'南康市',360700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360801,'市辖区',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360802,'吉州区',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360803,'青原区',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360821,'吉安县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360822,'吉水县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360823,'峡江县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360824,'新干县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360825,'永丰县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360826,'泰和县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360827,'遂川县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360828,'万安县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360829,'安福县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360830,'永新县',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360881,'井冈山市',360800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360901,'市辖区',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360902,'袁州区',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360921,'奉新县',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360922,'万载县',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360923,'上高县',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360924,'宜丰县',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360925,'靖安县',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360926,'铜鼓县',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360981,'丰城市',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360982,'樟树市',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(360983,'高安市',360900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361001,'市辖区',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361002,'临川区',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361021,'南城县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361022,'黎川县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361023,'南丰县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361024,'崇仁县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361025,'乐安县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361026,'宜黄县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361027,'金溪县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361028,'资溪县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361029,'东乡县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361030,'广昌县',361000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361101,'市辖区',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361102,'信州区',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361121,'上饶县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361122,'广丰县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361123,'玉山县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361124,'铅山县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361125,'横峰县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361126,'弋阳县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361127,'余干县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361128,'鄱阳县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361129,'万年县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361130,'婺源县',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(361181,'德兴市',361100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370101,'市辖区',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370102,'历下区',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370103,'市中区',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370104,'槐荫区',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370105,'天桥区',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370112,'历城区',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370113,'长清区',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370124,'平阴县',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370125,'济阳县',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370126,'商河县',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370181,'章丘市',370100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370201,'市辖区',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370202,'市南区',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370203,'市北区',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370205,'四方区',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370211,'黄岛区',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370212,'崂山区',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370213,'李沧区',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370214,'城阳区',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370281,'胶州市',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370282,'即墨市',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370283,'平度市',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370284,'胶南市',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370285,'莱西市',370200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370301,'市辖区',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370302,'淄川区',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370303,'张店区',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370304,'博山区',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370305,'临淄区',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370306,'周村区',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370321,'桓台县',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370322,'高青县',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370323,'沂源县',370300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370401,'市辖区',370400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370402,'市中区',370400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370403,'薛城区',370400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370404,'峄城区',370400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370405,'台儿庄区',370400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370406,'山亭区',370400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370481,'滕州市',370400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370501,'市辖区',370500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370502,'东营区',370500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370503,'河口区',370500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370521,'垦利县',370500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370522,'利津县',370500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370523,'广饶县',370500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370601,'市辖区',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370602,'芝罘区',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370611,'福山区',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370612,'牟平区',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370613,'莱山区',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370634,'长岛县',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370681,'龙口市',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370682,'莱阳市',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370683,'莱州市',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370684,'蓬莱市',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370685,'招远市',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370686,'栖霞市',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370687,'海阳市',370600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370701,'市辖区',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370702,'潍城区',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370703,'寒亭区',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370704,'坊子区',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370705,'奎文区',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370724,'临朐县',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370725,'昌乐县',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370781,'青州市',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370782,'诸城市',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370783,'寿光市',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370784,'安丘市',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370785,'高密市',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370786,'昌邑市',370700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370801,'市辖区',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370802,'市中区',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370811,'任城区',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370826,'微山县',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370827,'鱼台县',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370828,'金乡县',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370829,'嘉祥县',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370830,'汶上县',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370831,'泗水县',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370832,'梁山县',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370881,'曲阜市',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370882,'兖州市',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370883,'邹城市',370800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370901,'市辖区',370900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370902,'泰山区',370900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370903,'岱岳区',370900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370921,'宁阳县',370900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370923,'东平县',370900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370982,'新泰市',370900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(370983,'肥城市',370900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371001,'市辖区',371000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371002,'环翠区',371000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371081,'文登市',371000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371082,'荣成市',371000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371083,'乳山市',371000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371101,'市辖区',371100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371102,'东港区',371100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371103,'岚山区',371100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371121,'五莲县',371100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371122,'莒县',371100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371201,'市辖区',371200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371202,'莱城区',371200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371203,'钢城区',371200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371301,'市辖区',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371302,'兰山区',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371311,'罗庄区',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371312,'河东区',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371321,'沂南县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371322,'郯城县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371323,'沂水县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371324,'苍山县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371325,'费县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371326,'平邑县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371327,'莒南县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371328,'蒙阴县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371329,'临沭县',371300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371401,'市辖区',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371402,'德城区',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371421,'陵县',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371422,'宁津县',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371423,'庆云县',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371424,'临邑县',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371425,'齐河县',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371426,'平原县',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371427,'夏津县',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371428,'武城县',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371481,'乐陵市',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371482,'禹城市',371400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371501,'市辖区',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371502,'东昌府区',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371521,'阳谷县',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371522,'莘县',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371523,'茌平县',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371524,'东阿县',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371525,'冠县',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371526,'高唐县',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371581,'临清市',371500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371601,'市辖区',371600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371602,'滨城区',371600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371621,'惠民县',371600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371622,'阳信县',371600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371623,'无棣县',371600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371624,'沾化县',371600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371625,'博兴县',371600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371626,'邹平县',371600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371701,'市辖区',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371702,'牡丹区',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371721,'曹县',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371722,'单县',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371723,'成武县',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371724,'巨野县',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371725,'郓城县',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371726,'鄄城县',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371727,'定陶县',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(371728,'东明县',371700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410101,'市辖区',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410102,'中原区',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410103,'二七区',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410104,'管城回族区',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410105,'金水区',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410106,'上街区',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410108,'邙山区',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410122,'中牟县',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410181,'巩义市',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410182,'荥阳市',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410183,'新密市',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410184,'新郑市',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410185,'登封市',410100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410201,'市辖区',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410202,'龙亭区',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410203,'顺河回族区',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410204,'鼓楼区',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410205,'南关区',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410211,'郊区',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410221,'杞县',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410222,'通许县',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410223,'尉氏县',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410224,'开封县',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410225,'兰考县',410200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410301,'市辖区',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410302,'老城区',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410303,'西工区',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410304,'廛河回族区',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410305,'涧西区',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410306,'吉利区',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410307,'洛龙区',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410322,'孟津县',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410323,'新安县',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410324,'栾川县',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410325,'嵩县',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410326,'汝阳县',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410327,'宜阳县',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410328,'洛宁县',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410329,'伊川县',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410381,'偃师市',410300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410401,'市辖区',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410402,'新华区',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410403,'卫东区',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410404,'石龙区',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410411,'湛河区',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410421,'宝丰县',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410422,'叶县',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410423,'鲁山县',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410425,'郏县',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410481,'舞钢市',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410482,'汝州市',410400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410501,'市辖区',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410502,'文峰区',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410503,'北关区',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410505,'殷都区',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410506,'龙安区',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410522,'安阳县',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410523,'汤阴县',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410526,'滑县',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410527,'内黄县',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410581,'林州市',410500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410601,'市辖区',410600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410602,'鹤山区',410600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410603,'山城区',410600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410611,'淇滨区',410600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410621,'浚县',410600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410622,'淇县',410600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410701,'市辖区',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410702,'红旗区',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410703,'卫滨区',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410704,'凤泉区',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410711,'牧野区',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410721,'新乡县',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410724,'获嘉县',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410725,'原阳县',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410726,'延津县',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410727,'封丘县',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410728,'长垣县',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410781,'卫辉市',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410782,'辉县市',410700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410801,'市辖区',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410802,'解放区',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410803,'中站区',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410804,'马村区',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410811,'山阳区',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410821,'修武县',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410822,'博爱县',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410823,'武陟县',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410825,'温县',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410881,'济源市',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410882,'沁阳市',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410883,'孟州市',410800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410901,'市辖区',410900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410902,'华龙区',410900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410922,'清丰县',410900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410923,'南乐县',410900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410926,'范县',410900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410927,'台前县',410900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(410928,'濮阳县',410900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411001,'市辖区',411000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411002,'魏都区',411000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411023,'许昌县',411000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411024,'鄢陵县',411000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411025,'襄城县',411000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411081,'禹州市',411000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411082,'长葛市',411000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411101,'市辖区',411100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411102,'源汇区',411100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411103,'郾城区',411100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411104,'召陵区',411100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411121,'舞阳县',411100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411122,'临颍县',411100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411201,'市辖区',411200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411202,'湖滨区',411200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411221,'渑池县',411200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411222,'陕县',411200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411224,'卢氏县',411200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411281,'义马市',411200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411282,'灵宝市',411200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411301,'市辖区',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411302,'宛城区',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411303,'卧龙区',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411321,'南召县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411322,'方城县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411323,'西峡县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411324,'镇平县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411325,'内乡县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411326,'淅川县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411327,'社旗县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411328,'唐河县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411329,'新野县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411330,'桐柏县',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411381,'邓州市',411300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411401,'市辖区',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411402,'梁园区',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411403,'睢阳区',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411421,'民权县',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411422,'睢县',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411423,'宁陵县',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411424,'柘城县',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411425,'虞城县',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411426,'夏邑县',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411481,'永城市',411400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411501,'市辖区',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411502,'师河区',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411503,'平桥区',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411521,'罗山县',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411522,'光山县',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411523,'新县',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411524,'商城县',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411525,'固始县',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411526,'潢川县',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411527,'淮滨县',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411528,'息县',411500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411601,'市辖区',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411602,'川汇区',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411621,'扶沟县',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411622,'西华县',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411623,'商水县',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411624,'沈丘县',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411625,'郸城县',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411626,'淮阳县',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411627,'太康县',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411628,'鹿邑县',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411681,'项城市',411600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411701,'市辖区',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411702,'驿城区',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411721,'西平县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411722,'上蔡县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411723,'平舆县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411724,'正阳县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411725,'确山县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411726,'泌阳县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411727,'汝南县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411728,'遂平县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(411729,'新蔡县',411700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420101,'市辖区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420102,'江岸区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420103,'江汉区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420104,'乔口区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420105,'汉阳区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420106,'武昌区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420107,'青山区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420111,'洪山区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420112,'东西湖区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420113,'汉南区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420114,'蔡甸区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420115,'江夏区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420116,'黄陂区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420117,'新洲区',420100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420201,'市辖区',420200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420202,'黄石港区',420200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420203,'西塞山区',420200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420204,'下陆区',420200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420205,'铁山区',420200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420222,'阳新县',420200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420281,'大冶市',420200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420301,'市辖区',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420302,'茅箭区',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420303,'张湾区',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420321,'郧县',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420322,'郧西县',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420323,'竹山县',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420324,'竹溪县',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420325,'房县',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420381,'丹江口市',420300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420501,'市辖区',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420502,'西陵区',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420503,'伍家岗区',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420504,'点军区',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420505,'猇亭区',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420506,'夷陵区',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420525,'远安县',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420526,'兴山县',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420527,'秭归县',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420528,'长阳土家族自治县',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420529,'五峰土家族自治县',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420581,'宜都市',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420582,'当阳市',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420583,'枝江市',420500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420601,'市辖区',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420602,'襄城区',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420606,'樊城区',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420607,'襄阳区',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420624,'南漳县',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420625,'谷城县',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420626,'保康县',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420682,'老河口市',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420683,'枣阳市',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420684,'宜城市',420600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420701,'市辖区',420700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420702,'梁子湖区',420700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420703,'华容区',420700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420704,'鄂城区',420700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420801,'市辖区',420800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420802,'东宝区',420800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420804,'掇刀区',420800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420821,'京山县',420800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420822,'沙洋县',420800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420881,'钟祥市',420800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420901,'市辖区',420900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420902,'孝南区',420900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420921,'孝昌县',420900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420922,'大悟县',420900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420923,'云梦县',420900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420981,'应城市',420900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420982,'安陆市',420900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(420984,'汉川市',420900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421001,'市辖区',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421002,'沙市区',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421003,'荆州区',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421022,'公安县',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421023,'监利县',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421024,'江陵县',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421081,'石首市',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421083,'洪湖市',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421087,'松滋市',421000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421101,'市辖区',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421102,'黄州区',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421121,'团风县',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421122,'红安县',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421123,'罗田县',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421124,'英山县',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421125,'浠水县',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421126,'蕲春县',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421127,'黄梅县',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421181,'麻城市',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421182,'武穴市',421100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421201,'市辖区',421200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421202,'咸安区',421200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421221,'嘉鱼县',421200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421222,'通城县',421200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421223,'崇阳县',421200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421224,'通山县',421200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421281,'赤壁市',421200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421301,'市辖区',421300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421302,'曾都区',421300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(421381,'广水市',421300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(422801,'恩施市',422800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(422802,'利川市',422800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(422822,'建始县',422800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(422823,'巴东县',422800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(422825,'宣恩县',422800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(422826,'咸丰县',422800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(422827,'来凤县',422800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(422828,'鹤峰县',422800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(429004,'仙桃市',429000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(429005,'潜江市',429000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(429006,'天门市',429000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(429021,'神农架林区',429000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430101,'市辖区',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430102,'芙蓉区',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430103,'天心区',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430104,'岳麓区',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430105,'开福区',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430111,'雨花区',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430121,'长沙县',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430122,'望城县',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430124,'宁乡县',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430181,'浏阳市',430100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430201,'市辖区',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430202,'荷塘区',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430203,'芦淞区',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430204,'石峰区',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430211,'天元区',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430221,'株洲县',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430223,'攸县',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430224,'茶陵县',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430225,'炎陵县',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430281,'醴陵市',430200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430301,'市辖区',430300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430302,'雨湖区',430300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430304,'岳塘区',430300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430321,'湘潭县',430300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430381,'湘乡市',430300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430382,'韶山市',430300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430401,'市辖区',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430405,'珠晖区',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430406,'雁峰区',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430407,'石鼓区',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430408,'蒸湘区',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430412,'南岳区',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430421,'衡阳县',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430422,'衡南县',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430423,'衡山县',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430424,'衡东县',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430426,'祁东县',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430481,'耒阳市',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430482,'常宁市',430400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430501,'市辖区',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430502,'双清区',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430503,'大祥区',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430511,'北塔区',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430521,'邵东县',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430522,'新邵县',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430523,'邵阳县',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430524,'隆回县',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430525,'洞口县',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430527,'绥宁县',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430528,'新宁县',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430529,'城步苗族自治县',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430581,'武冈市',430500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430601,'市辖区',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430602,'岳阳楼区',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430603,'云溪区',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430611,'君山区',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430621,'岳阳县',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430623,'华容县',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430624,'湘阴县',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430626,'平江县',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430681,'汨罗市',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430682,'临湘市',430600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430701,'市辖区',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430702,'武陵区',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430703,'鼎城区',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430721,'安乡县',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430722,'汉寿县',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430723,'澧县',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430724,'临澧县',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430725,'桃源县',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430726,'石门县',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430781,'津市市',430700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430801,'市辖区',430800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430802,'永定区',430800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430811,'武陵源区',430800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430821,'慈利县',430800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430822,'桑植县',430800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430901,'市辖区',430900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430902,'资阳区',430900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430903,'赫山区',430900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430921,'南县',430900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430922,'桃江县',430900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430923,'安化县',430900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(430981,'沅江市',430900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431001,'市辖区',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431002,'北湖区',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431003,'苏仙区',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431021,'桂阳县',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431022,'宜章县',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431023,'永兴县',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431024,'嘉禾县',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431025,'临武县',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431026,'汝城县',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431027,'桂东县',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431028,'安仁县',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431081,'资兴市',431000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431101,'市辖区',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431102,'芝山区',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431103,'冷水滩区',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431121,'祁阳县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431122,'东安县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431123,'双牌县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431124,'道县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431125,'江永县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431126,'宁远县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431127,'蓝山县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431128,'新田县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431129,'江华瑶族自治县',431100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431201,'市辖区',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431202,'鹤城区',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431221,'中方县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431222,'沅陵县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431223,'辰溪县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431224,'溆浦县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431225,'会同县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431226,'麻阳苗族自治县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431227,'新晃侗族自治县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431228,'芷江侗族自治县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431229,'靖州苗族侗族自治县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431230,'通道侗族自治县',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431281,'洪江市',431200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431301,'市辖区',431300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431302,'娄星区',431300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431321,'双峰县',431300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431322,'新化县',431300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431381,'冷水江市',431300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(431382,'涟源市',431300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(433101,'吉首市',433100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(433122,'泸溪县',433100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(433123,'凤凰县',433100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(433124,'花垣县',433100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(433125,'保靖县',433100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(433126,'古丈县',433100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(433127,'永顺县',433100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(433130,'龙山县',433100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440101,'市辖区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440102,'东山区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440103,'荔湾区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440104,'越秀区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440105,'海珠区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440106,'天河区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440107,'芳村区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440111,'白云区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440112,'黄埔区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440113,'番禺区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440114,'花都区',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440183,'增城市',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440184,'从化市',440100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440201,'市辖区',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440203,'武江区',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440204,'浈江区',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440205,'曲江区',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440222,'始兴县',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440224,'仁化县',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440229,'翁源县',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440232,'乳源瑶族自治县',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440233,'新丰县',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440281,'乐昌市',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440282,'南雄市',440200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440301,'市辖区',440300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440303,'罗湖区',440300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440304,'福田区',440300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440305,'南山区',440300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440306,'宝安区',440300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440307,'龙岗区',440300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440308,'盐田区',440300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440401,'市辖区',440400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440402,'香洲区',440400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440403,'斗门区',440400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440404,'金湾区',440400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440501,'市辖区',440500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440507,'龙湖区',440500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440511,'金平区',440500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440512,'濠江区',440500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440513,'潮阳区',440500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440514,'潮南区',440500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440515,'澄海区',440500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440523,'南澳县',440500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440601,'市辖区',440600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440604,'禅城区',440600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440605,'南海区',440600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440606,'顺德区',440600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440607,'三水区',440600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440608,'高明区',440600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440701,'市辖区',440700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440703,'蓬江区',440700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440704,'江海区',440700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440705,'新会区',440700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440781,'台山市',440700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440783,'开平市',440700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440784,'鹤山市',440700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440785,'恩平市',440700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440801,'市辖区',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440802,'赤坎区',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440803,'霞山区',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440804,'坡头区',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440811,'麻章区',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440823,'遂溪县',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440825,'徐闻县',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440881,'廉江市',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440882,'雷州市',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440883,'吴川市',440800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440901,'市辖区',440900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440902,'茂南区',440900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440903,'茂港区',440900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440923,'电白县',440900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440981,'高州市',440900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440982,'化州市',440900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(440983,'信宜市',440900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441201,'市辖区',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441202,'端州区',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441203,'鼎湖区',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441223,'广宁县',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441224,'怀集县',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441225,'封开县',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441226,'德庆县',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441283,'高要市',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441284,'四会市',441200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441301,'市辖区',441300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441302,'惠城区',441300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441303,'惠阳区',441300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441322,'博罗县',441300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441323,'惠东县',441300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441324,'龙门县',441300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441401,'市辖区',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441402,'梅江区',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441421,'梅县',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441422,'大埔县',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441423,'丰顺县',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441424,'五华县',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441426,'平远县',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441427,'蕉岭县',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441481,'兴宁市',441400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441501,'市辖区',441500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441502,'城区',441500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441521,'海丰县',441500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441523,'陆河县',441500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441581,'陆丰市',441500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441601,'市辖区',441600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441602,'源城区',441600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441621,'紫金县',441600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441622,'龙川县',441600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441623,'连平县',441600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441624,'和平县',441600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441625,'东源县',441600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441701,'市辖区',441700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441702,'江城区',441700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441721,'阳西县',441700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441723,'阳东县',441700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441781,'阳春市',441700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441801,'市辖区',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441802,'清城区',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441821,'佛冈县',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441823,'阳山县',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441825,'连山壮族瑶族自治县',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441826,'连南瑶族自治县',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441827,'清新县',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441881,'英德市',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(441882,'连州市',441800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445101,'市辖区',445100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445102,'湘桥区',445100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445121,'潮安县',445100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445122,'饶平县',445100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445201,'市辖区',445200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445202,'榕城区',445200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445221,'揭东县',445200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445222,'揭西县',445200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445224,'惠来县',445200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445281,'普宁市',445200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445301,'市辖区',445300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445302,'云城区',445300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445321,'新兴县',445300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445322,'郁南县',445300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445323,'云安县',445300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(445381,'罗定市',445300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450101,'市辖区',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450102,'兴宁区',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450103,'青秀区',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450105,'江南区',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450107,'西乡塘区',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450108,'良庆区',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450109,'邕宁区',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450122,'武鸣县',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450123,'隆安县',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450124,'马山县',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450125,'上林县',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450126,'宾阳县',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450127,'横县',450100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450201,'市辖区',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450202,'城中区',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450203,'鱼峰区',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450204,'柳南区',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450205,'柳北区',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450221,'柳江县',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450222,'柳城县',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450223,'鹿寨县',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450224,'融安县',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450225,'融水苗族自治县',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450226,'三江侗族自治县',450200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450301,'市辖区',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450302,'秀峰区',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450303,'叠彩区',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450304,'象山区',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450305,'七星区',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450311,'雁山区',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450321,'阳朔县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450322,'临桂县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450323,'灵川县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450324,'全州县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450325,'兴安县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450326,'永福县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450327,'灌阳县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450328,'龙胜各族自治县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450329,'资源县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450330,'平乐县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450331,'荔蒲县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450332,'恭城瑶族自治县',450300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450401,'市辖区',450400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450403,'万秀区',450400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450404,'蝶山区',450400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450405,'长洲区',450400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450421,'苍梧县',450400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450422,'藤县',450400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450423,'蒙山县',450400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450481,'岑溪市',450400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450501,'市辖区',450500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450502,'海城区',450500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450503,'银海区',450500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450512,'铁山港区',450500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450521,'合浦县',450500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450601,'市辖区',450600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450602,'港口区',450600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450603,'防城区',450600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450621,'上思县',450600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450681,'东兴市',450600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450701,'市辖区',450700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450702,'钦南区',450700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450703,'钦北区',450700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450721,'灵山县',450700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450722,'浦北县',450700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450801,'市辖区',450800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450802,'港北区',450800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450803,'港南区',450800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450804,'覃塘区',450800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450821,'平南县',450800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450881,'桂平市',450800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450901,'市辖区',450900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450902,'玉州区',450900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450921,'容县',450900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450922,'陆川县',450900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450923,'博白县',450900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450924,'兴业县',450900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(450981,'北流市',450900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451001,'市辖区',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451002,'右江区',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451021,'田阳县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451022,'田东县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451023,'平果县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451024,'德保县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451025,'靖西县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451026,'那坡县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451027,'凌云县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451028,'乐业县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451029,'田林县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451030,'西林县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451031,'隆林各族自治县',451000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451101,'市辖区',451100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451102,'八步区',451100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451121,'昭平县',451100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451122,'钟山县',451100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451123,'富川瑶族自治县',451100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451201,'市辖区',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451202,'金城江区',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451221,'南丹县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451222,'天峨县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451223,'凤山县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451224,'东兰县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451225,'罗城仫佬族自治县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451226,'环江毛南族自治县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451227,'巴马瑶族自治县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451228,'都安瑶族自治县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451229,'大化瑶族自治县',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451281,'宜州市',451200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451301,'市辖区',451300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451302,'兴宾区',451300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451321,'忻城县',451300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451322,'象州县',451300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451323,'武宣县',451300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451324,'金秀瑶族自治县',451300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451381,'合山市',451300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451401,'市辖区',451400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451402,'江洲区',451400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451421,'扶绥县',451400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451422,'宁明县',451400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451423,'龙州县',451400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451424,'大新县',451400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451425,'天等县',451400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(451481,'凭祥市',451400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(460101,'市辖区',460100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(460105,'秀英区',460100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(460106,'龙华区',460100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(460107,'琼山区',460100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(460108,'美兰区',460100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(460201,'市辖区',460200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469001,'五指山市',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469002,'琼海市',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469003,'儋州市',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469005,'文昌市',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469006,'万宁市',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469007,'东方市',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469025,'定安县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469026,'屯昌县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469027,'澄迈县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469028,'临高县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469030,'白沙黎族自治县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469031,'昌江黎族自治县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469033,'乐东黎族自治县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469034,'陵水黎族自治县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469035,'保亭黎族苗族自治县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469036,'琼中黎族苗族自治县',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469037,'西沙群岛',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469038,'南沙群岛',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(469039,'中沙群岛的岛礁及其海域',469000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500101,'万州区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500102,'涪陵区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500103,'渝中区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500104,'大渡口区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500105,'江北区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500106,'沙坪坝区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500107,'九龙坡区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500108,'南岸区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500109,'北碚区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500110,'万盛区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500111,'双桥区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500112,'渝北区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500113,'巴南区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500114,'黔江区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500115,'长寿区',500100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500222,'綦江县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500223,'潼南县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500224,'铜梁县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500225,'大足县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500226,'荣昌县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500227,'璧山县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500228,'梁平县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500229,'城口县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500230,'丰都县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500231,'垫江县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500232,'武隆县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500233,'忠县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500234,'开县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500235,'云阳县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500236,'奉节县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500237,'巫山县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500238,'巫溪县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500240,'石柱土家族自治县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500241,'秀山土家族苗族自治县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500242,'酉阳土家族苗族自治县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500243,'彭水苗族土家族自治县',500200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500381,'江津市',500300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500382,'合川市',500300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500383,'永川市',500300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(500384,'南川市',500300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510101,'市辖区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510104,'锦江区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510105,'青羊区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510106,'金牛区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510107,'武侯区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510108,'成华区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510112,'龙泉驿区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510113,'青白江区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510114,'新都区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510115,'温江区',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510121,'金堂县',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510122,'双流县',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510124,'郫县',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510129,'大邑县',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510131,'蒲江县',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510132,'新津县',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510181,'都江堰市',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510182,'彭州市',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510183,'邛崃市',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510184,'崇州市',510100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510301,'市辖区',510300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510302,'自流井区',510300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510303,'贡井区',510300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510304,'大安区',510300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510311,'沿滩区',510300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510321,'荣县',510300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510322,'富顺县',510300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510401,'市辖区',510400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510402,'东区',510400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510403,'西区',510400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510411,'仁和区',510400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510421,'米易县',510400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510422,'盐边县',510400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510501,'市辖区',510500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510502,'江阳区',510500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510503,'纳溪区',510500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510504,'龙马潭区',510500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510521,'泸县',510500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510522,'合江县',510500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510524,'叙永县',510500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510525,'古蔺县',510500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510601,'市辖区',510600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510603,'旌阳区',510600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510623,'中江县',510600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510626,'罗江县',510600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510681,'广汉市',510600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510682,'什邡市',510600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510683,'绵竹市',510600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510701,'市辖区',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510703,'涪城区',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510704,'游仙区',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510722,'三台县',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510723,'盐亭县',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510724,'安县',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510725,'梓潼县',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510726,'北川羌族自治县',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510727,'平武县',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510781,'江油市',510700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510801,'市辖区',510800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510802,'市中区',510800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510811,'元坝区',510800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510812,'朝天区',510800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510821,'旺苍县',510800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510822,'青川县',510800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510823,'剑阁县',510800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510824,'苍溪县',510800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510901,'市辖区',510900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510903,'船山区',510900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510904,'安居区',510900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510921,'蓬溪县',510900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510922,'射洪县',510900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(510923,'大英县',510900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511001,'市辖区',511000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511002,'市中区',511000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511011,'东兴区',511000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511024,'威远县',511000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511025,'资中县',511000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511028,'隆昌县',511000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511101,'市辖区',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511102,'市中区',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511111,'沙湾区',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511112,'五通桥区',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511113,'金口河区',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511123,'犍为县',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511124,'井研县',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511126,'夹江县',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511129,'沐川县',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511132,'峨边彝族自治县',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511133,'马边彝族自治县',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511181,'峨眉山市',511100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511301,'市辖区',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511302,'顺庆区',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511303,'高坪区',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511304,'嘉陵区',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511321,'南部县',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511322,'营山县',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511323,'蓬安县',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511324,'仪陇县',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511325,'西充县',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511381,'阆中市',511300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511401,'市辖区',511400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511402,'东坡区',511400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511421,'仁寿县',511400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511422,'彭山县',511400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511423,'洪雅县',511400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511424,'丹棱县',511400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511425,'青神县',511400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511501,'市辖区',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511502,'翠屏区',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511521,'宜宾县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511522,'南溪县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511523,'江安县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511524,'长宁县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511525,'高县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511526,'珙县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511527,'筠连县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511528,'兴文县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511529,'屏山县',511500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511601,'市辖区',511600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511602,'广安区',511600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511621,'岳池县',511600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511622,'武胜县',511600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511623,'邻水县',511600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511681,'华莹市',511600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511701,'市辖区',511700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511702,'通川区',511700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511721,'达县',511700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511722,'宣汉县',511700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511723,'开江县',511700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511724,'大竹县',511700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511725,'渠县',511700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511781,'万源市',511700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511801,'市辖区',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511802,'雨城区',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511821,'名山县',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511822,'荥经县',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511823,'汉源县',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511824,'石棉县',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511825,'天全县',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511826,'芦山县',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511827,'宝兴县',511800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511901,'市辖区',511900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511902,'巴州区',511900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511921,'通江县',511900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511922,'南江县',511900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(511923,'平昌县',511900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(512001,'市辖区',512000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(512002,'雁江区',512000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(512021,'安岳县',512000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(512022,'乐至县',512000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(512081,'简阳市',512000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513221,'汶川县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513222,'理县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513223,'茂县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513224,'松潘县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513225,'九寨沟县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513226,'金川县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513227,'小金县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513228,'黑水县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513229,'马尔康县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513230,'壤塘县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513231,'阿坝县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513232,'若尔盖县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513233,'红原县',513200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513321,'康定县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513322,'泸定县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513323,'丹巴县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513324,'九龙县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513325,'雅江县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513326,'道孚县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513327,'炉霍县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513328,'甘孜县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513329,'新龙县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513330,'德格县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513331,'白玉县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513332,'石渠县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513333,'色达县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513334,'理塘县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513335,'巴塘县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513336,'乡城县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513337,'稻城县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513338,'得荣县',513300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513401,'西昌市',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513422,'木里藏族自治县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513423,'盐源县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513424,'德昌县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513425,'会理县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513426,'会东县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513427,'宁南县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513428,'普格县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513429,'布拖县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513430,'金阳县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513431,'昭觉县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513432,'喜德县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513433,'冕宁县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513434,'越西县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513435,'甘洛县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513436,'美姑县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(513437,'雷波县',513400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520101,'市辖区',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520102,'南明区',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520103,'云岩区',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520111,'花溪区',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520112,'乌当区',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520113,'白云区',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520114,'小河区',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520121,'开阳县',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520122,'息烽县',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520123,'修文县',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520181,'清镇市',520100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520201,'钟山区',520200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520203,'六枝特区',520200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520221,'水城县',520200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520222,'盘县',520200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520301,'市辖区',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520302,'红花岗区',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520303,'汇川区',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520321,'遵义县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520322,'桐梓县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520323,'绥阳县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520324,'正安县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520325,'道真仡佬族苗族自治县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520326,'务川仡佬族苗族自治县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520327,'凤冈县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520328,'湄潭县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520329,'余庆县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520330,'习水县',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520381,'赤水市',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520382,'仁怀市',520300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520401,'市辖区',520400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520402,'西秀区',520400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520421,'平坝县',520400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520422,'普定县',520400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520423,'镇宁布依族苗族自治县',520400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520424,'关岭布依族苗族自治县',520400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(520425,'紫云苗族布依族自治县',520400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522201,'铜仁市',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522222,'江口县',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522223,'玉屏侗族自治县',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522224,'石阡县',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522225,'思南县',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522226,'印江土家族苗族自治县',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522227,'德江县',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522228,'沿河土家族自治县',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522229,'松桃苗族自治县',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522230,'万山特区',522200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522301,'兴义市',522300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522322,'兴仁县',522300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522323,'普安县',522300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522324,'晴隆县',522300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522325,'贞丰县',522300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522326,'望谟县',522300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522327,'册亨县',522300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522328,'安龙县',522300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522401,'毕节市',522400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522422,'大方县',522400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522423,'黔西县',522400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522424,'金沙县',522400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522425,'织金县',522400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522426,'纳雍县',522400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522427,'威宁彝族回族苗族自治县',522400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522428,'赫章县',522400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522601,'凯里市',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522622,'黄平县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522623,'施秉县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522624,'三穗县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522625,'镇远县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522626,'岑巩县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522627,'天柱县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522628,'锦屏县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522629,'剑河县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522630,'台江县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522631,'黎平县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522632,'榕江县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522633,'从江县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522634,'雷山县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522635,'麻江县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522636,'丹寨县',522600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522701,'都匀市',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522702,'福泉市',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522722,'荔波县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522723,'贵定县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522725,'瓮安县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522726,'独山县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522727,'平塘县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522728,'罗甸县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522729,'长顺县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522730,'龙里县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522731,'惠水县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(522732,'三都水族自治县',522700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530101,'市辖区',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530102,'五华区',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530103,'盘龙区',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530111,'官渡区',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530112,'西山区',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530113,'东川区',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530121,'呈贡县',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530122,'晋宁县',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530124,'富民县',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530125,'宜良县',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530126,'石林彝族自治县',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530127,'嵩明县',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530128,'禄劝彝族苗族自治县',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530129,'寻甸回族彝族自治县',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530181,'安宁市',530100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530301,'市辖区',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530302,'麒麟区',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530321,'马龙县',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530322,'陆良县',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530323,'师宗县',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530324,'罗平县',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530325,'富源县',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530326,'会泽县',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530328,'沾益县',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530381,'宣威市',530300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530401,'市辖区',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530402,'红塔区',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530421,'江川县',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530422,'澄江县',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530423,'通海县',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530424,'华宁县',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530425,'易门县',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530426,'峨山彝族自治县',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530427,'新平彝族傣族自治县',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530428,'元江哈尼族彝族傣族自治县',530400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530501,'市辖区',530500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530502,'隆阳区',530500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530521,'施甸县',530500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530522,'腾冲县',530500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530523,'龙陵县',530500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530524,'昌宁县',530500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530601,'市辖区',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530602,'昭阳区',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530621,'鲁甸县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530622,'巧家县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530623,'盐津县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530624,'大关县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530625,'永善县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530626,'绥江县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530627,'镇雄县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530628,'彝良县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530629,'威信县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530630,'水富县',530600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530701,'市辖区',530700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530702,'古城区',530700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530721,'玉龙纳西族自治县',530700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530722,'永胜县',530700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530723,'华坪县',530700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530724,'宁蒗彝族自治县',530700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530801,'市辖区',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530802,'翠云区',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530821,'普洱哈尼族彝族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530822,'墨江哈尼族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530823,'景东彝族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530824,'景谷傣族彝族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530825,'镇沅彝族哈尼族拉祜族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530826,'江城哈尼族彝族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530827,'孟连傣族拉祜族佤族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530828,'澜沧拉祜族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530829,'西盟佤族自治县',530800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530901,'市辖区',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530902,'临翔区',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530921,'凤庆县',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530922,'云县',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530923,'永德县',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530924,'镇康县',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530925,'双江拉祜族佤族布朗族傣族自治县',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530926,'耿马傣族佤族自治县',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(530927,'沧源佤族自治县',530900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532301,'楚雄市',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532322,'双柏县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532323,'牟定县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532324,'南华县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532325,'姚安县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532326,'大姚县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532327,'永仁县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532328,'元谋县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532329,'武定县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532331,'禄丰县',532300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532501,'个旧市',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532502,'开远市',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532522,'蒙自县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532523,'屏边苗族自治县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532524,'建水县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532525,'石屏县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532526,'弥勒县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532527,'泸西县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532528,'元阳县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532529,'红河县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532530,'金平苗族瑶族傣族自治县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532531,'绿春县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532532,'河口瑶族自治县',532500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532621,'文山县',532600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532622,'砚山县',532600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532623,'西畴县',532600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532624,'麻栗坡县',532600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532625,'马关县',532600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532626,'丘北县',532600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532627,'广南县',532600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532628,'富宁县',532600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532801,'景洪市',532800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532822,'勐海县',532800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532823,'勐腊县',532800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532901,'大理市',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532922,'漾濞彝族自治县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532923,'祥云县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532924,'宾川县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532925,'弥渡县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532926,'南涧彝族自治县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532927,'巍山彝族回族自治县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532928,'永平县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532929,'云龙县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532930,'洱源县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532931,'剑川县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(532932,'鹤庆县',532900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533102,'瑞丽市',533100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533103,'潞西市',533100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533122,'梁河县',533100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533123,'盈江县',533100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533124,'陇川县',533100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533321,'泸水县',533300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533323,'福贡县',533300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533324,'贡山独龙族怒族自治县',533300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533325,'兰坪白族普米族自治县',533300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533421,'香格里拉县',533400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533422,'德钦县',533400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(533423,'维西傈僳族自治县',533400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540101,'市辖区',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540102,'城关区',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540121,'林周县',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540122,'当雄县',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540123,'尼木县',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540124,'曲水县',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540125,'堆龙德庆县',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540126,'达孜县',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(540127,'墨竹工卡县',540100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542121,'昌都县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542122,'江达县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542123,'贡觉县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542124,'类乌齐县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542125,'丁青县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542126,'察雅县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542127,'八宿县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542128,'左贡县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542129,'芒康县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542132,'洛隆县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542133,'边坝县',542100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542221,'乃东县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542222,'扎囊县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542223,'贡嘎县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542224,'桑日县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542225,'琼结县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542226,'曲松县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542227,'措美县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542228,'洛扎县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542229,'加查县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542231,'隆子县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542232,'错那县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542233,'浪卡子县',542200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542301,'日喀则市',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542322,'南木林县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542323,'江孜县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542324,'定日县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542325,'萨迦县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542326,'拉孜县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542327,'昂仁县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542328,'谢通门县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542329,'白朗县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542330,'仁布县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542331,'康马县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542332,'定结县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542333,'仲巴县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542334,'亚东县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542335,'吉隆县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542336,'聂拉木县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542337,'萨嘎县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542338,'岗巴县',542300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542421,'那曲县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542422,'嘉黎县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542423,'比如县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542424,'聂荣县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542425,'安多县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542426,'申扎县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542427,'索县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542428,'班戈县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542429,'巴青县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542430,'尼玛县',542400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542521,'普兰县',542500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542522,'札达县',542500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542523,'噶尔县',542500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542524,'日土县',542500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542525,'革吉县',542500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542526,'改则县',542500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542527,'措勤县',542500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542621,'林芝县',542600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542622,'工布江达县',542600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542623,'米林县',542600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542624,'墨脱县',542600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542625,'波密县',542600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542626,'察隅县',542600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(542627,'朗县',542600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610101,'市辖区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610102,'新城区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610103,'碑林区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610104,'莲湖区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610111,'灞桥区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610112,'未央区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610113,'雁塔区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610114,'阎良区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610115,'临潼区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610116,'长安区',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610122,'蓝田县',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610124,'周至县',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610125,'户县',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610126,'高陵县',610100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610201,'市辖区',610200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610202,'王益区',610200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610203,'印台区',610200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610204,'耀州区',610200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610222,'宜君县',610200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610301,'市辖区',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610302,'渭滨区',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610303,'金台区',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610304,'陈仓区',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610322,'凤翔县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610323,'岐山县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610324,'扶风县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610326,'眉县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610327,'陇县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610328,'千阳县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610329,'麟游县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610330,'凤县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610331,'太白县',610300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610401,'市辖区',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610402,'秦都区',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610403,'杨凌区',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610404,'渭城区',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610422,'三原县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610423,'泾阳县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610424,'乾县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610425,'礼泉县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610426,'永寿县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610427,'彬县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610428,'长武县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610429,'旬邑县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610430,'淳化县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610431,'武功县',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610481,'兴平市',610400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610501,'市辖区',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610502,'临渭区',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610521,'华县',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610522,'潼关县',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610523,'大荔县',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610524,'合阳县',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610525,'澄城县',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610526,'蒲城县',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610527,'白水县',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610528,'富平县',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610581,'韩城市',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610582,'华阴市',610500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610601,'市辖区',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610602,'宝塔区',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610621,'延长县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610622,'延川县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610623,'子长县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610624,'安塞县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610625,'志丹县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610626,'吴旗县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610627,'甘泉县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610628,'富县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610629,'洛川县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610630,'宜川县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610631,'黄龙县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610632,'黄陵县',610600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610701,'市辖区',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610702,'汉台区',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610721,'南郑县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610722,'城固县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610723,'洋县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610724,'西乡县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610725,'勉县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610726,'宁强县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610727,'略阳县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610728,'镇巴县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610729,'留坝县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610730,'佛坪县',610700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610801,'市辖区',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610802,'榆阳区',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610821,'神木县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610822,'府谷县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610823,'横山县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610824,'靖边县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610825,'定边县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610826,'绥德县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610827,'米脂县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610828,'佳县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610829,'吴堡县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610830,'清涧县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610831,'子洲县',610800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610901,'市辖区',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610902,'汉滨区',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610921,'汉阴县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610922,'石泉县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610923,'宁陕县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610924,'紫阳县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610925,'岚皋县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610926,'平利县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610927,'镇坪县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610928,'旬阳县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(610929,'白河县',610900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(611001,'市辖区',611000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(611002,'商州区',611000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(611021,'洛南县',611000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(611022,'丹凤县',611000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(611023,'商南县',611000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(611024,'山阳县',611000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(611025,'镇安县',611000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(611026,'柞水县',611000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620101,'市辖区',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620102,'城关区',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620103,'七里河区',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620104,'西固区',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620105,'安宁区',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620111,'红古区',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620121,'永登县',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620122,'皋兰县',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620123,'榆中县',620100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620201,'市辖区',620200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620301,'市辖区',620300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620302,'金川区',620300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620321,'永昌县',620300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620401,'市辖区',620400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620402,'白银区',620400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620403,'平川区',620400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620421,'靖远县',620400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620422,'会宁县',620400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620423,'景泰县',620400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620501,'市辖区',620500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620502,'秦城区',620500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620503,'北道区',620500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620521,'清水县',620500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620522,'秦安县',620500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620523,'甘谷县',620500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620524,'武山县',620500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620525,'张家川回族自治县',620500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620601,'市辖区',620600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620602,'凉州区',620600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620621,'民勤县',620600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620622,'古浪县',620600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620623,'天祝藏族自治县',620600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620701,'市辖区',620700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620702,'甘州区',620700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620721,'肃南裕固族自治县',620700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620722,'民乐县',620700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620723,'临泽县',620700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620724,'高台县',620700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620725,'山丹县',620700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620801,'市辖区',620800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620802,'崆峒区',620800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620821,'泾川县',620800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620822,'灵台县',620800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620823,'崇信县',620800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620824,'华亭县',620800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620825,'庄浪县',620800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620826,'静宁县',620800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620901,'市辖区',620900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620902,'肃州区',620900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620921,'金塔县',620900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620922,'安西县',620900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620923,'肃北蒙古族自治县',620900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620924,'阿克塞哈萨克族自治县',620900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620981,'玉门市',620900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(620982,'敦煌市',620900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621001,'市辖区',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621002,'西峰区',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621021,'庆城县',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621022,'环县',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621023,'华池县',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621024,'合水县',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621025,'正宁县',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621026,'宁县',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621027,'镇原县',621000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621101,'市辖区',621100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621102,'安定区',621100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621121,'通渭县',621100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621122,'陇西县',621100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621123,'渭源县',621100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621124,'临洮县',621100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621125,'漳县',621100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621126,'岷县',621100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621201,'市辖区',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621202,'武都区',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621221,'成县',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621222,'文县',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621223,'宕昌县',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621224,'康县',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621225,'西和县',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621226,'礼县',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621227,'徽县',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(621228,'两当县',621200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(622901,'临夏市',622900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(622921,'临夏县',622900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(622922,'康乐县',622900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(622923,'永靖县',622900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(622924,'广河县',622900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(622925,'和政县',622900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(622926,'东乡族自治县',622900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(622927,'积石山保安族东乡族撒拉族自治县',622900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(623001,'合作市',623000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(623021,'临潭县',623000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(623022,'卓尼县',623000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(623023,'舟曲县',623000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(623024,'迭部县',623000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(623025,'玛曲县',623000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(623026,'碌曲县',623000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(623027,'夏河县',623000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(630101,'市辖区',630100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(630102,'城东区',630100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(630103,'城中区',630100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(630104,'城西区',630100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(630105,'城北区',630100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(630121,'大通回族土族自治县',630100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(630122,'湟中县',630100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(630123,'湟源县',630100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632121,'平安县',632100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632122,'民和回族土族自治县',632100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632123,'乐都县',632100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632126,'互助土族自治县',632100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632127,'化隆回族自治县',632100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632128,'循化撒拉族自治县',632100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632221,'门源回族自治县',632200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632222,'祁连县',632200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632223,'海晏县',632200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632224,'刚察县',632200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632321,'同仁县',632300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632322,'尖扎县',632300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632323,'泽库县',632300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632324,'河南蒙古族自治县',632300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632521,'共和县',632500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632522,'同德县',632500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632523,'贵德县',632500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632524,'兴海县',632500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632525,'贵南县',632500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632621,'玛沁县',632600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632622,'班玛县',632600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632623,'甘德县',632600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632624,'达日县',632600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632625,'久治县',632600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632626,'玛多县',632600)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632721,'玉树县',632700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632722,'杂多县',632700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632723,'称多县',632700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632724,'治多县',632700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632725,'囊谦县',632700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632726,'曲麻莱县',632700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632801,'格尔木市',632800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632802,'德令哈市',632800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632821,'乌兰县',632800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632822,'都兰县',632800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(632823,'天峻县',632800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640101,'市辖区',640100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640104,'兴庆区',640100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640105,'西夏区',640100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640106,'金凤区',640100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640121,'永宁县',640100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640122,'贺兰县',640100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640181,'灵武市',640100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640201,'市辖区',640200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640202,'大武口区',640200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640205,'惠农区',640200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640221,'平罗县',640200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640301,'市辖区',640300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640302,'利通区',640300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640323,'盐池县',640300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640324,'同心县',640300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640381,'青铜峡市',640300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640401,'市辖区',640400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640402,'原州区',640400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640422,'西吉县',640400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640423,'隆德县',640400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640424,'泾源县',640400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640425,'彭阳县',640400)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640501,'市辖区',640500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640502,'沙坡头区',640500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640521,'中宁县',640500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(640522,'海原县',640500)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650101,'市辖区',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650102,'天山区',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650103,'沙依巴克区',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650104,'新市区',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650105,'水磨沟区',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650106,'头屯河区',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650107,'达坂城区',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650108,'东山区',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650121,'乌鲁木齐县',650100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650201,'市辖区',650200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650202,'独山子区',650200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650203,'克拉玛依区',650200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650204,'白碱滩区',650200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(650205,'乌尔禾区',650200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652101,'吐鲁番市',652100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652122,'鄯善县',652100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652123,'托克逊县',652100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652201,'哈密市',652200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652222,'巴里坤哈萨克自治县',652200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652223,'伊吾县',652200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652301,'昌吉市',652300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652302,'阜康市',652300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652303,'米泉市',652300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652323,'呼图壁县',652300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652324,'玛纳斯县',652300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652325,'奇台县',652300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652327,'吉木萨尔县',652300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652328,'木垒哈萨克自治县',652300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652701,'博乐市',652700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652722,'精河县',652700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652723,'温泉县',652700)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652801,'库尔勒市',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652822,'轮台县',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652823,'尉犁县',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652824,'若羌县',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652825,'且末县',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652826,'焉耆回族自治县',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652827,'和静县',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652828,'和硕县',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652829,'博湖县',652800)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652901,'阿克苏市',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652922,'温宿县',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652923,'库车县',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652924,'沙雅县',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652925,'新和县',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652926,'拜城县',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652927,'乌什县',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652928,'阿瓦提县',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(652929,'柯坪县',652900)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653001,'阿图什市',653000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653022,'阿克陶县',653000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653023,'阿合奇县',653000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653024,'乌恰县',653000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653101,'喀什市',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653121,'疏附县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653122,'疏勒县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653123,'英吉沙县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653124,'泽普县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653125,'莎车县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653126,'叶城县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653127,'麦盖提县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653128,'岳普湖县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653129,'伽师县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653130,'巴楚县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653131,'塔什库尔干塔吉克自治县',653100)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653201,'和田市',653200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653221,'和田县',653200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653222,'墨玉县',653200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653223,'皮山县',653200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653224,'洛浦县',653200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653225,'策勒县',653200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653226,'于田县',653200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(653227,'民丰县',653200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654002,'伊宁市',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654003,'奎屯市',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654021,'伊宁县',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654022,'察布查尔锡伯自治县',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654023,'霍城县',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654024,'巩留县',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654025,'新源县',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654026,'昭苏县',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654027,'特克斯县',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654028,'尼勒克县',654000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654201,'塔城市',654200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654202,'乌苏市',654200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654221,'额敏县',654200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654223,'沙湾县',654200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654224,'托里县',654200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654225,'裕民县',654200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654226,'和布克赛尔蒙古自治县',654200)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654301,'阿勒泰市',654300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654321,'布尔津县',654300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654322,'富蕴县',654300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654323,'福海县',654300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654324,'哈巴河县',654300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654325,'青河县',654300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(654326,'吉木乃县',654300)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(659001,'石河子市',659000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(659002,'阿拉尔市',659000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(659003,'图木舒克市',659000)
INSERT INTO AreaCounty(Acode,Aname,CityCode) VALUES(659004,'五家渠市',659000)
Go
-- =========================================================
/*(7)==============================================================================
--SQL取时间部分、SQL取日期部分
==============================================================================*/
SELECT CONVERT(varchar(8),GetDate(),8)
SELECT CONVERT(varchar(8),GetDate(),24)
SELECT CONVERT(varchar(8),GetDate(),108)
select convert(varchar(10),getdate(),120)
select convert(varchar(10),getdate(),23)
-- =========================================================
------------------------------以上总结时间:2015-06-02 20:51:01
/*(8)==============================================================================
* Description: 获取指定数据库指定表的字段以及字段长度,字段说明等相关数据信息,便于后期
* 开发代码生成器做准备。juser可以换成自己需要查询的表名称 即可
==============================================================================*/
SELECT
colorder = C.column_id ,
ColumnName = C.name ,
TypeName = T.name ,
Length = CASE WHEN T.name = 'nchar' THEN C.max_length / 2
WHEN T.name = 'nvarchar' THEN C.max_length / 2
ELSE C.max_length
END ,
Preci = C.precision ,
Scale = C.scale ,
IsIdentity = CASE WHEN C.is_identity = 1 THEN N'1'
ELSE N''
END ,
isPK = ISNULL(IDX.PrimaryKey, N'') ,
Computed = CASE WHEN C.is_computed = 1 THEN N'1'
ELSE N''
END ,
IndexName = ISNULL(IDX.IndexName, N'') ,
IndexSort = ISNULL(IDX.Sort, N'') ,
Create_Date = O.Create_Date ,
Modify_Date = O.Modify_date ,
cisNull = CASE WHEN C.is_nullable = 1 THEN N'1'
ELSE N''
END ,
defaultVal = ISNULL(D.definition, N'') ,
deText = ISNULL(PFD.[value], N'')
FROM
sys.columns C
INNER JOIN sys.objects O ON C.[object_id] = O.[object_id]
AND ( O.type = 'U'
OR O.type = 'V'
)
AND O.is_ms_shipped = 0
INNER JOIN sys.types T ON C.user_type_id = T.user_type_id
LEFT JOIN sys.default_constraints D ON C.[object_id] = D.parent_object_id
AND C.column_id = D.parent_column_id
AND C.default_object_id = D.[object_id]
LEFT JOIN sys.extended_properties PFD ON PFD.class = 1
AND C.[object_id] = PFD.major_id
AND C.column_id = PFD.minor_id
LEFT JOIN sys.extended_properties PTB ON PTB.class = 1
AND PTB.minor_id = 0
AND C.[object_id] = PTB.major_id
LEFT JOIN -- 索引及主键信息
( SELECT
IDXC.[object_id] ,
IDXC.column_id ,
Sort = CASE INDEXKEY_PROPERTY(IDXC.[object_id], IDXC.index_id,
IDXC.index_column_id, 'IsDescending')
WHEN 1 THEN 'DESC'
WHEN 0 THEN 'ASC'
ELSE ''
END ,
PrimaryKey = CASE WHEN IDX.is_primary_key = 1 THEN N'1'
ELSE N''
END ,
IndexName = IDX.Name
FROM
sys.indexes IDX
INNER JOIN sys.index_columns IDXC ON IDX.[object_id] = IDXC.[object_id]
AND IDX.index_id = IDXC.index_id
LEFT JOIN sys.key_constraints KC ON IDX.[object_id] = KC.[parent_object_id]
AND IDX.index_id = KC.unique_index_id
INNER JOIN -- 对于一个列包含多个索引的情况,只显示第1个索引信息
( SELECT
[object_id] ,
Column_id ,
index_id = MIN(index_id)
FROM
sys.index_columns
GROUP BY
[object_id] ,
Column_id
) IDXCUQ ON IDXC.[object_id] = IDXCUQ.[object_id]
AND IDXC.Column_id = IDXCUQ.Column_id
AND IDXC.index_id = IDXCUQ.index_id
) IDX ON C.[object_id] = IDX.[object_id]
AND C.column_id = IDX.column_id
WHERE
O.name = N'juser' --数据库中表的名称juser可以替换成自己需要查询的表
ORDER BY
O.name ,
C.column_id
-- =========================================================
------------------------------以上总结时间:2015-06-02 21:02:55
/*(9)==============================================================================
--SQL Server中Money转Decimal无损转换
================================================================================*/
DECLARE @int_digits SMALLINT,@digits SMALLINT,@total_digits SMALLINT,@sqlstr NVARCHAR(100)
DECLARE @input MONEY
DECLARE @f FLOAT
SET @input=234214.4434
SET @int_digits=floor(log10(@input))+1
SET @f=@input-floor(@input)
SELECT @digits=case LEN(CAST(@f AS VARCHAR))-2
WHEN -1 THEN 2
WHEN 1 THEN 2
WHEN 2 THEN 2
WHEN 3 THEN 3
ELSE 4
END
SET @total_digits=@int_digits+1+@digits
SET @sqlstr=N'SELECT CAST('+STR(@input,@total_digits,@total_digits)+' AS DECIMAL('+STR(@total_digits)+N','+STR(@digits)+N'))'
exec sp_executesql @sqlstr
-- =========================================================
------------------------------以上总结时间:2015-06-02 21:12:23
/*(10)==============================================================================
*(1).查看 SQL 2005 登录帐户所属服务器角色
*(2).SQL 2005 用户所属数据库角色
*(3).查看 SQL 2005 用户被赋予的权限
*(4).查询SQL Server 2005数据库中数据库的最后备份日期
================================================================================*/
--1.
use master
go
select SrvRole = g.name, MemberName = u.name, MemberSID = u.sid
from sys.server_principals u, sys.server_principals g, sys.server_role_members m
where g.principal_id = m.role_principal_id
and u.principal_id = m.member_principal_id
order by 1, 2
go
--2.
use [7277_mallshop]
go
select DbRole = g.name, MemberName = u.name, MemberSID = u.sid
from sys.database_principals u, sys.database_principals g, sys.database_role_members m
where g.principal_id = m.role_principal_id
and u.principal_id = m.member_principal_id
order by 1, 2
go
--3.
use [7277_mallshop]
go
exec sp_helprotect @username = 'wcgj2198'
go
--4.
SELECT a.Name AS DatabaseName,COALESCE(CONVERT(VARCHAR(12),MAX(b.backup_finish_date),101),'Not Yet Taken') AS LastBackUpDate,COALESCE(CONVERT(VARCHAR(12),MAX(b.user_name),101),'NA') AS TakenBy
FROM
sys.sysdatabases a
LEFT OUTER JOIN
msdb.dbo.backupset b
ON b.database_name=a.name
GROUP BY a.Name
ORDER BY a.Name
-- =========================================================
/*(11)==============================================================================
*sql server中千万数量级分页存储过程代码
================================================================================*/
CREATE PROCEDURE CN5135_SP_Pagination
/*
***************************************************************
参数说明:
1.Tables :表名称,视图
2.PrimaryKey :主关键字
3.Sort :排序语句,不带Order By 比如:NewsID Desc,OrderRows Asc
4.CurrentPage :当前页码
5.PageSize :分页尺寸
6.Filter :过滤语句,不带Where
7.Group :Group语句,不带Group By
***************************************************************/
(
@Tables varchar(1000),
@PrimaryKey varchar(100),
@Sort varchar(200) = NULL,
@CurrentPage int = 1,
@PageSize int = 10,
@Fields varchar(1000) = '*',
@Filter varchar(1000) = NULL,
@Group varchar(1000) = NULL
)
AS
/*默认排序*/
IF @Sort IS NULL OR @Sort = ''
SET @Sort = @PrimaryKey
DECLARE @SortTable varchar(100)
DECLARE @SortName varchar(100)
DECLARE @strSortColumn varchar(200)
DECLARE @operator char(2)
DECLARE @type varchar(100)
DECLARE @prec int
/*设定排序语句.*/
IF CHARINDEX('DESC',@Sort)>0
BEGIN
SET @strSortColumn = REPLACE(@Sort, 'DESC', '')
SET @operator = '<='
END
ELSE
BEGIN
IF CHARINDEX('ASC', @Sort) = 0
SET @strSortColumn = REPLACE(@Sort, 'ASC', '')
SET @operator = '>='
END
IF CHARINDEX('.', @strSortColumn) > 0
BEGIN
SET @SortTable = SUBSTRING(@strSortColumn, 0, CHARINDEX('.',@strSortColumn))
SET @SortName = SUBSTRING(@strSortColumn, CHARINDEX('.',@strSortColumn) + 1, LEN(@strSortColumn))
END
ELSE
BEGIN
SET @SortTable = @Tables
SET @SortName = @strSortColumn
END
SELECT @type=t.name, @prec=c.prec
FROM sysobjects o
JOIN syscolumns c on o.id=c.id
JOIN systypes t on c.xusertype=t.xusertype
WHERE o.name = @SortTable AND c.name = @SortName
IF CHARINDEX('char', @type) > 0
SET @type = @type + '(' + CAST(@prec AS varchar) + ')'
DECLARE @strPageSize varchar(50)
DECLARE @strStartRow varchar(50)
DECLARE @strFilter varchar(1000)
DECLARE @strSimpleFilter varchar(1000)
DECLARE @strGroup varchar(1000)
/*默认当前页*/
IF @CurrentPage < 1
SET @CurrentPage = 1
/*设置分页参数.*/
SET @strPageSize = CAST(@PageSize AS varchar(50))
SET @strStartRow = CAST(((@CurrentPage - 1)*@PageSize + 1) AS varchar(50))
/*筛选以及分组语句.*/
IF @Filter IS NOT NULL AND @Filter != ''
BEGIN
SET @strFilter = ' WHERE ' + @Filter + ' '
SET @strSimpleFilter = ' AND ' + @Filter + ' '
END
ELSE
BEGIN
SET @strSimpleFilter = ''
SET @strFilter = ''
END
IF @Group IS NOT NULL AND @Group != ''
SET @strGroup = ' GROUP BY ' + @Group + ' '
ELSE
SET @strGroup = ''
/*执行查询语句*/
EXEC(
'
DECLARE @SortColumn ' + @type + '
SET ROWCOUNT ' + @strStartRow + '
SELECT @SortColumn=' + @strSortColumn + ' FROM ' + @Tables + @strFilter + ' ' + @strGroup + ' ORDER BY ' + @Sort + '
SET ROWCOUNT ' + @strPageSize + '
SELECT ' + @Fields + ' FROM ' + @Tables + ' WHERE ' + @strSortColumn + @operator + ' @SortColumn ' + @strSimpleFilter + ' ' + @strGroup + ' ORDER BY ' + @Sort + '
'
)
GO
--动态查询输出数据
declare @sql1 nvarchar(200),@sql2 nvarchar(200)
declare @count nvarchar(100);
set @sql1 = 'SELECT CONVERT(varchar(100), GETDATE(), 0)'
set @sql2 = 'SELECT @count = CONVERT(varchar(100), GETDATE(), 0)'
exec sp_executesql @sql2,N'@count nvarchar(50) out',@count out
print @sql1 +':'+ @count
-- =========================================================
------------------------------以上总结时间:2015-06-02 21:39:42
/*(12)==============================================================================
*SQL实现显示杨辉三角
================================================================================*/
CREATE proc #pr_YangHui
@c int
as
/* SQL实现显示杨辉三角 */
/* 版本: 1.0 */
/* 作者: Haiwer */
/* 版权所有 */
/* 2006.05.10 */
set nocount on
if @c<2 return --两层以下就不排了
declare @i int
declare @j int
declare @sql varchar(8000)
declare @sql1 varchar(8000)
declare @sql2 varchar(8000)
create table #(id int IDENTITY(1,1),a50000 bigint)
insert #(a50000) values (1) --第一层
set @i=2
while @i<=@c
begin
--为了实现动态层,只好动态修改临时表结构
set @sql='alter table # add a'+cast(50000+@i-1 as varchar(10))+' bigint,a'+cast(50000-@i+1 as varchar(10))+' bigint'
exec (@sql)
set @sql1=''
set @sql2=''
set @j=@i-1
while @j>=0
begin
--这里判断有点乱
if @j=0
set @sql1=@sql1+',a'+cast(50000-@j as varchar(10))
else
set @sql1=@sql1+',a'+cast(50000-@j as varchar(10))+',a'+cast(50000+@j as varchar(10))
if @j=@i-1
set @sql2=@sql2+',1,1'
else
if @j=0
set @sql2=@sql2+',a'+cast(50000-@j-1 as varchar(10))+'+a'+cast(50000-@j+1 as varchar(10))
else
set @sql2=@sql2+',a'+cast(50000-@j-1 as varchar(10))+'+a'+cast(50000-@j+1 as varchar(10))+',a'+cast(50000+@j-1 as varchar(10))+'+a'+cast(50000+@j+1 as varchar(10))
set @j=@j-2
end
--去掉多余的逗号
set @sql1=right(@sql1,len(@sql1)-1)
set @sql2=right(@sql2,len(@sql2)-1)
set @sql=cast(@i-1 as varchar(10))
exec('insert #('+@sql1+') select '+@sql2+' from # where id='+@sql)
set @i=@i+1
end
set @i=50000-@c+1
set @j=50000+@c-1
set @sql=''
--去最长的数据,就是为了节省显示空间
select @sql1=CAST(len(cast(max(a50000) as varchar(50)))+1 AS VARCHAR(10)) from #
while @i<=@j
begin
set @sql=@sql+',isnull(cast(a'+cast(@i as varchar(10))+' as varchar('+@sql1+')),'''')'
set @i=@i+1
end
exec ('select id'+@sql+' from # order by id')
drop table #
GO
--调用
exec #pr_YangHui 10
-- ============================================================
------------------------------以上总结时间:2015-06-02 21:44:26
/*(13)==============================================================================
**(1).查询所有触发器
**(2).查询所有索引
**(3).获取只有用户定义的存储过程
================================================================================*/
--1.
select triggers.name as [触发器],tables.name as [表名],triggers.is_disabled as [是否禁用],
triggers.is_instead_of_trigger AS [触发器类型],
case when triggers.is_instead_of_trigger = 1 then 'INSTEAD OF'
when triggers.is_instead_of_trigger = 0 then 'AFTER'
else null
end as [触发器类型描述]
from sys.triggers triggers
inner join sys.tables tables on triggers.parent_id = tables.object_id
where triggers.type ='TR'
order by triggers.create_date
--2.
select indexs.Tab_Name as [表名],indexs.Index_Name as [索引名] ,indexs.[Co_Names] as [索引列],
Ind_Attribute.is_primary_key as [是否主键],Ind_Attribute.is_unique AS [是否唯一键],
Ind_Attribute.is_disabled AS [是否禁用]
from (
select Tab_Name,Index_Name, [Co_Names]=stuff((select ','+[Co_Name] from
( select tab.Name as Tab_Name,ind.Name as Index_Name,Col.Name as Co_Name from sys.indexes ind
inner join sys.tables tab on ind.Object_id = tab.object_id and ind.type in (1,2)
inner join sys.index_columns index_columns on tab.object_id = index_columns.object_id and ind.index_id = index_columns.index_id
inner join sys.columns Col on tab.object_id = Col.object_id and index_columns.column_id = Col.column_id
) t where Tab_Name=tb.Tab_Name and Index_Name=tb.Index_Name for xml path('')), 1, 1, '')
from (
select tab.Name as Tab_Name,ind.Name as Index_Name,Col.Name as Co_Name from sys.indexes ind
inner join sys.tables tab on ind.Object_id = tab.object_id and ind.type in (1,2)
inner join sys.index_columns index_columns on tab.object_id = index_columns.object_id and ind.index_id = index_columns.index_id
inner join sys.columns Col on tab.object_id = Col.object_id and index_columns.column_id = Col.column_id
)tb
where Tab_Name not like 'sys%'
group by Tab_Name,Index_Name
) indexs inner join sys.indexes Ind_Attribute on indexs.Index_Name = Ind_Attribute.name
order by indexs.Tab_Name
--3.
SELECT * FROM sys.all_objects
WHERE ([type] = 'P' OR [type] = 'X' OR [type] = 'PC') AND [is_ms_shipped] = 0 ORDER BY [name];
GO
SELECT * FROM sysobjects where type='P'
-- ============================================================
------------------------------以上总结时间:2015-06-04 09:18:26
/*(14)==============================================================================
**(1). SQL Server 2005/2008遍历所有表统计行数
**(2).查询所有索引
**(3).获取只有用户定义的存储过程
===================================================================================*/
DECLARE CountTableRecords CURSOR READ_ONLY FOR
SELECT sst.name,
Schema_name(sst.schema_id)
FROM sys.tables sst
WHERE sst.TYPE = 'U'
DECLARE @name VARCHAR(80),
@schema VARCHAR(40)
OPEN CountTableRecords
FETCH NEXT FROM CountTableRecords INTO @name, @schema
WHILE ( @@FETCH_STATUS <> -1 )
BEGIN
IF ( @@FETCH_STATUS <> -2 )
BEGIN
PRINT @name
DECLARE @sql NVARCHAR(1024)
SET @sql='DECLARE @count BIGINT SELECT @count=COUNT(1) FROM ' + Quotename(@schema)
+
'.' + Quotename(@name) +' PRINT @count'
EXEC Sp_executesql @sql
END
FETCH NEXT FROM CountTableRecords INTO @name, @schema
END
CLOSE CountTableRecords
DEALLOCATE CountTableRecords
GO
-- ============================================================
/*(15)==============================================================================
/* 显示时分表时间 */
==================================================================================*/
SELECT CONVERT(VARCHAR(50),GETDATE(),108)
-- ============================================================
/*(16)==============================================================================
*生成300个8位不重复纯数字随机数
==================================================================================*/
DECLARE @i INT;
DECLARE @j INT;
DECLARE @qnum INT; --生成随机数的数量
Set @i=1;
Set @qnum =301;
SET NOCOUNT ON
CREATE TABLE #temp_Table(num INT)
WHILE(@i<@qnum)
BEGIN
SELECT @j = cast( floor(rand()*(99999999-10000000)+10000000) as int)
IF(NOT EXISTS(SELECT num FROM #temp_Table WHERE num=@j ))
BEGIN
INSERT #temp_Table (num) VALUES (@j)
SET @i=@i+1;
END
END
SELECT DISTINCT num FROM #temp_Table
DROP TABLE #temp_Table
-- ============================================================
------------------------------以上总结时间:2015-06-04 11:45:01
/*(17)==============================================================================
*获取当前数据库文件等信息*
==================================================================================*/
SELECT dbf.file_id AS FileID
, dbf.name AS [FileName]
, s.filename AS FileLocation
, CAST(dbf.size/128.0 AS DECIMAL(19,2)) AS FileSizeMB
, CAST(CAST(FILEPROPERTY(dbf.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(19,2)) AS SpaceUsedMB
, CAST(dbf.size/128.0 - CAST(FILEPROPERTY(dbf.name, 'SpaceUsed') AS int)/128.0 AS DECIMAL(19,2)) AS AvailableSpaceMB
, CAST((dbf.size / 128.0 - (FILEPROPERTY(dbf.name, 'SpaceUsed') / 128.0)) / (dbf.size / 128.0) * 100 AS DECIMAL(19,2)) AS [%FreeSpace]
, dbf.growth / 128 AS FileGrowthMB
, f.name AS FilegroupName
FROM sys.database_files dbf
INNER JOIN sys.sysfiles s ON dbf.name = s.name
LEFT JOIN sys.filegroups f ON dbf.data_space_id = f.data_space_id
ORDER BY dbf.name;
-- ============================================================
/*(18)==============================================================================
/*比如:XX_YY_L12
我要得到的字符串是 XX_YY
如何根据 @Test_Line 来获取 @Test*/
==================================================================================*/
declare @Test_Line varchar(50),@Test varchar(50);
SET @Test_Line ='XX_YY_L12';
SET @Test = SUBSTRING(@Test_Line, CHARINDEX('_',@Test_Line)+1,50)
print @Test
-- ============================================================
/*(19)==============================================================================
/*--2015-4-11 想变成 150411 */
==================================================================================*/
SELECT CONVERT(VARCHAR(6),GETDATE(),12)
-- ============================================================
/*(20)==============================================================================
/*--sql计算上周日的日期*/
==================================================================================*/
select getdate() as '当前时间',getdate()-datepart(w,getdate())+1 as '上周日'
-- ============================================================
/*(21)==============================================================================
/*----获取年月日20150604*/
==================================================================================*/
select CONVERT(char(8),getdate(),112)
-- ============================================================
/*(22)==============================================================================
/*----公共表达式*/
==================================================================================*/
use mallshop
go
drop table tb
CREATE TABLE tb
(
ID INT PRIMARY KEY,
strName VARCHAR(40) NOT NULL,
ParentID INT DEFAULT(0)
)
go
insert into tb(ID,strName,ParentID)
select 1,'广东',0 union
select 2,'广西',0 union
select 3,'广州市',1 union
select 4,'深圳市',1 UNION
select 5,'南宁市',2 union
select 6,'柳州市',2 UNION
select 7,'天河区',3 union
select 8,'白云区',4 UNION
select 9,'青秀区',5 union
select 10,'江南区',5
select * from tb
/*如果不一定要分成多列的话*/
;WITH CTE AS(
SELECT ID,strName,ParentID
,1 DEEP
,CAST(strName AS VARCHAR(8000))strNamePath
FROM tb
WHERE ParentID=0
UNION ALL
SELECT T1.ID,T1.strName,T1.ParentID
,T2.DEEP+1
,T2.strNamePath+' '+T1.strName
FROM tb T1
JOIN CTE T2 ON T1.ParentID=T2.ID
)
SELECT ID,strNamePath
FROM CTE
ORDER BY DEEP,ID
-- ============================================================
/*(23)==============================================================================
/*这个条件中里面的有个102,我查询数据库的时候会把10,02之类的也查询出来
charindex(b.ITEM_COST_BUDGET , '11,50,53,54,59,102')>0
前后,都加一个逗号,就可以了,大概如下:
charindex( ',' + ltrim(b.ITEM_COST_BUDGET) + ',' , ',11,50,53,54,59,102,')>0*/
==================================================================================*/
SELECT * FROM juser where charindex( ',' + ltrim(adids) + ',' , ',77,78,79,80,')>0
-- =================================================================================
/*(24)==============================================================================
/*小数点前一位大于0就进一位
财务的要求,想多收点客户的钱
比如
212
就得到220
211.5也是220
*/
==================================================================================*/
DECLARE @DecadeFlag TINYINT ; -- 定义需要进位的位置.注意数据类型变化,这里只到10分位,则定义为了TINYINT
DECLARE @PrecisionFlag MONEY ; -- 定义需要的显示的精度
--赋值
SET @DecadeFlag = 10;
SET @PrecisionFlag = 1.0000;
SELECT [O].[RealPrice],CEILING([O].[RealPrice]/@DecadeFlag)*@DecadeFlag * @PrecisionFlag AS 'NewRealPrice' FROM [order] AS [O]
WHERE [O].[orderno]='JM0000053' ;
/*
结果
RealPrice NewRealPrice
------------ ------------------
69.00 70.00
*/
-- =================================================================================
/*(25)==============================================================================
/*教循环操作*/
--创建测试表
==================================================================================*/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t]') AND type in (N'U'))
DROP TABLE [dbo].[t]
CREATE TABLE t(Name VARCHAR(10),Score INT)
--插入测试数据
insert into t
select '张三',100 union all
select '李四',200 union all
select '王五',390
declare @i int,@count int,@Name varchar(10)
--表记录总数
select @count = count(1) from t
--初始化循环变量
set @i = 1;
select row_number() over(order by Name) ID,* into #tba from t
while @i <= @count
begin
select @Name = Name from #tba where ID = @i
print @Name
--改变循环变量
set @i = @i + 1
end
-- =================================================================================
/*(26)==============================================================================
/*数据库横转列*/
==================================================================================*/
create table #test
(
姓名 nvarchar(5),
语文 int,
数学 int,
物理 int
)
insert into #test values
('李四',
'74',
'84',
'94')
insert into #test values
('张三',
'74',
'83',
'93')
select * from #test a
unpivot
(分数 for 课程 in(语文,数学,物理))b
-- =================================================================================
------------------------------以上总结时间:2015-06-05 09:34:17
/*(27)==============================================================================
/*
/*able1 主表
tid1 name
1 张一
2 张二
3 张三
4 张四
5 张五
table2 从表
tid2 tid1 time
1 1 2013-01-12
2 1 2013-03-12
3 1 2013-02-15
4 3 2013-05-12
5 2 2014-03-10
6 2 2014-10-10
想得到的数应为:(取时间最大的一条数据,没有时间的为空)
tid1 name time
1 张一 2013-03-12
2 张二 2014-10-10
3 张三 2013-05-12
4 张四 null
5 张五 null
怎么写sql语句啊,用lambda表达式如何写呢?
*/
*/
==================================================================================*/
--> 测试数据:[table1]
if object_id('[table1]') is not null drop table [table1]
go
create table [table1]([tid1] int,[name] varchar(4))
insert [table1]
select 1,'张一' union all
select 2,'张二' union all
select 3,'张三' union all
select 4,'张四' union all
select 5,'张五'
--> 测试数据:[table2]
if object_id('[table2]') is not null drop table [table2]
go
create table [table2]([tid2] int,[tid1] int,[time] datetime)
insert [table2]
select 1,1,'2013-01-12' union all
select 2,1,'2013-03-12' union all
select 3,1,'2013-02-15' union all
select 4,3,'2013-05-12' union all
select 5,2,'2014-03-10' union all
select 6,2,'2014-10-10'
--------------开始查询--------------------------
/*方法一:*/
SELECT
a.tid1,a.name,b.time
FROM
[table1] AS a
LEFT JOIN [table2] AS b ON a.tid1=b.tid1
WHERE
NOT EXISTS ( SELECT
1
FROM
table2
WHERE
tid1=b.tid1 AND [time]
----------------结果----------------------------
/* tid1 name time
----------- ---- -----------------------
1 张一 2013-01-12 00:00:00.000
2 张二 2014-03-10 00:00:00.000
3 张三 2013-05-12 00:00:00.000
4 张四 NULL
5 张五 NULL
(5 行受影响)
*/
/*方法二:*/
select tid1 ,name,time from
(
select ROW_NUMBER()over( partition by A.tid1 order by [time])as rownum ,A.tid1,A.name,B.time
from table1 A left join table2 B on A.tid1=B.tid1
) temp where temp.rownum=1
-- =================================================================================
/*(28)==============================================================================
/*BCP数据库备份成txt文本*/
==================================================================================*/
USE [7277_mallshop]
GO
EXEC SP_MSFOREACHTABLE 'EXEC master..xp_cmdshell ''bcp "SELECT * FROM [7277_mallshop].?" queryout "c:\?.txt" -c -S"198.44.249.103" -U"wcgj2198" -P"wcgj2198#@!~"'' '
GO
-- =================================================================================
------------------------------以上总结时间:2015-06-05 19:19:20.363
/*(29)==============================================================================
/*语句拼接的时候当遇到日期变量*/
==================================================================================*/
/*方法一:*/
declare @startDate datetime
declare @endDate datetime
declare @sql1 varchar(100)
declare @sql2 varchar(2000)
/*set @startDate='2014-07-01'
set @endDate='2014-07-21'
set @sql1 = ' select * from tableABC '
set @sql2 = ' where modiDate between '''+CONVERT(VARCHAR(10),@startDate,23)+''' and '''+CONVERT(VARCHAR(10),@endDate,23) +''''
*/
set @startDate='2014-05-01'
set @endDate='2015-07-21'
set @sql1 = ' select * from juser '
set @sql2 = ' where addtime between '''+CONVERT(VARCHAR(10),@startDate,23)+''' and '''+CONVERT(VARCHAR(10),@endDate,23) +''' '
EXEC (@sql1+@sql2)
/*方法二:*/
use mallshop
go
declare @startDate datetime
declare @endDate datetime
declare @sql1 varchar(100)
declare @sql2 varchar(2000)
declare @sql nvarchar(max)
set @startDate='2014-05-01'
set @endDate='2015-07-21'
set @sql1 = ' select * from juser '
set @sql2 = ' where addtime between @startDate and @endDate '
set @sql=@sql1+@sql2
exec sp_executesql @sql,N'@startDate datetime,@endDate datetime',@startDate,@endDate
go
/*方法三:*/
--簡化:
declare @startDate datetime
declare @endDate datetime
declare @sql nvarchar(max)
set @startDate='2014-05-01'
set @endDate='2015-07-21'
set @sql = ' select * from juser where addtime between @startDate and @endDate'
exec sp_executesql @sql,N'@startDate datetime,@endDate datetime',@startDate,@endDate
go
/*方法四:*/
declare @startDate datetime
declare @endDate datetime
declare @sql1 varchar(100)
declare @sql2 varchar(2000)
set @startDate='2014-05-01'
set @endDate='2015-07-21'
set @sql1 = ' select * from juser '
set @sql2 = ' where addtime between '''+convert(varchar,@startDate,120)+''' and '''+convert(varchar,@endDate,120)+''' '
exec(@sql1+@sql2)
-- =================================================================================
/*(30)==============================================================================
/*需求:使用sql server2005数据库,
其中有一个表中有一个“分值”的字段,
就是相当于一道试题多少分,
估计取值也就是 大于0少于20之间。
但是可以使用2位小数。
请问这个使用什么数据类型最合适?为什么?
*/
/*SQL2005可以用Decimal类型
Decimal、Numeric:由整数部分和小数部分构成,
其格式为:decimal(p,[s]) 或者numeric(p,[s]),
其中P为有效位数,S为小数位数,S默认值为0。
例: decimal(3,2), 2.78;
两者区别:decimal不能用于带有identity关键字的列
*/
==================================================================================*/
--建议:
decimal(4,2)
--类型.
--确定位数的话就用
DECIMAL
-- =================================================================================
------------------------------以上总结时间:2015-06-05 21:12:15.630
/*(31)==============================================================================
/*
需求:查询统计一个表的数据,但是我又不想使用这个表的所有数据,
根据某个字段([NUM])来筛选,取字段[ID]最大的那条数据来统计;
举例:
表中的数据
ID NUM X1 X2 X3
0 n1 x x x
1 n1 x x x
2 n1 y y y
3 n2 x x x
想要作为查询的数据
ID NUM X1 X2 X3
2 n1 y y y
3 n2 x x x
然后我写了大概如下的一个查询,能够实现我要的功能,但是速度惨不忍睹
*/
==================================================================================*/
if object_id('[quary]') is not null drop table [quary]
go
create table quary
(
ID int NULL,
NUM varchar(10) NULL,
X1 varchar(10) NULL,
X2 varchar(10) NULL,
X3 varchar(10) NULL
)
insert quary
select 0,'n1','x','x','x' union all
select 1,'n1','x','x','x' union all
select 2,'n1','y','y','y' union all
select 3,'n2','x','x','x'
/*
方法一:
*/
select * from quary as t where not exists(select 1 from quary where NUM=t.NUM and ID>t.ID)
-- =================================================================================
/*(32)==============================================================================
/*
需求:sqlserver 稍复杂的复合查询语言实例
在表A中有三个字段 A1,A2,A3,有n行数据,
请用sql语句查出,在表A中 ,已经出现的数字共出现的次数
表A 数据如下
A1 A2 A3
2 2 4
3 12 6
1 3 8
13 43 21
24 21 53
1 11 22
*/
==================================================================================*/
/*
实现方法一:
*/
drop table tb
create table tb (A1 int ,A2 int,A3 int)
insert into tb
select '2','2','4' union all
select '3','12','6' union all
select '1','3','8' union all
select '13','43','21' union all
select '24','21','53' union all
select '1','11','22'
go
with cte as
(
select * from tb
unpivot
(
v for c in(A1,A2,A3)
)u
)
select v as[数字],COUNT (v) as [出现次数] from cte group by v
--数字
出现次数
--1
2
--2
2
--3
2
--4
1
--6
1
--8
1
--11
1
--12
1
--13
1
--21
2
--22
1
--24
1
--43
1
--53
1
/*
实现方法二:
*/
WITH t AS
(
SELECT 2 AS A1, 2 AS A2, 4 AS A3
UNION ALL
SELECT 3,12,6
UNION ALL
SELECT 1,3,8
UNION ALL
SELECT 13,43,21
UNION ALL
SELECT 24,21,53
UNION ALL
SELECT 1,11,22)
SELECT A1, SUM(CNT) FROM
(
SELECT A1 AS A1, COUNT(A1) AS CNT FROM t group by A1
UNION ALL
SELECT A2 AS A1, COUNT(A2) AS CNT FROM t group by A2
UNION ALL
SELECT A3 AS A1, COUNT(A3) AS CNT FROM t group by A3
)
t0 group by A1
-- =================================================================================
/*(33)==============================================================================
/*动态列的问题*/
==================================================================================*/
if object_id('[dept]') is not null drop table [dept]
go
create table dept(name varchar(10))
insert into dept
select 'dept1' union all
select 'dept2' union all
select 'dept3' union all
select 'dept4'
if object_id('[date_time]') is not null drop table [date_time]
go
create table date_time(time varchar(10))
insert into date_time
select '2014-01' union all
select '2014-02' union all
select '2014-03' union all
select '2014-04' union all
select '2014-05' union all
select '2014-06'
/*sql STUFF用法
1、作用
删除指定长度的字符,并在指定的起点处插入另一组字符。
2、语法
STUFF ( character_expression , start , length ,character_expression )
3、示例
以下示例在第一个字符串 abcdef 中删除从第 2 个位置(字符 b)开始的三个字符,然后在删除的起始位置插入第二个字符串,
从而创建并返回一个字符串
SELECT STUFF('abcdef', 2, 3, 'ijklmn')
GO
下面是结果集 aijklmnef*/
select name,(select STUFF((select ','+time from date_time for xml path('')),1,1,''))
from dept
group by name
/*
dept1 2014-01,2014-02,2014-03,2014-04,2014-05,2014-06
dept2 2014-01,2014-02,2014-03,2014-04,2014-05,2014-06
dept3 2014-01,2014-02,2014-03,2014-04,2014-05,2014-06
dept4 2014-01,2014-02,2014-03,2014-04,2014-05,2014-06
*/
declare @sql varchar(max),@startdate datetime,@enddate datetime
set @startdate='2009-09-28'
set @enddate='2009-10-5'
set @sql='select '
select @sql=@sql+','''+convert(varchar(10),dateadd(day,number,@startdate),120)+''''
from master..spt_values where type='P' and number<=datediff(dd,@startdate,@enddate)
select @sql=stuff(@sql,8,1,' ')
exec(@sql)
/*---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
2009-09-28 2009-09-29 2009-09-30 2009-10-01 2009-10-02 2009-10-03 2009-10-04 2009-10-05
(1 行受影响)*/
-- =================================================================================
/*(34)==============================================================================
/*
/*
比如
日期为“2015-6-5”,那么就对应为“2015年第2季度”,
日期为“2015-10-1”,就对应为“2015年第4季度”。
系统函数
*/
*/
==================================================================================*/
SELECT datepart(quarter,GETDATE() )
-- =================================================================================
/*(35)==============================================================================
/*
/*sql server 多张相同结构的数据表查询*/
*/
==================================================================================*/
--> 测试数据[NameInfo]
if object_id('[NameInfo]') is not null drop table [NameInfo]
go
create table [NameInfo]([id] nvarchar(6),[Name] nvarchar(4),[tbName] nvarchar(6))
insert [NameInfo]
select '001','M1','tb1' union all
select '002','M2','tb2' union all
select '003','M3','tb3'
--> 测试数据[M1]
if object_id('[M1]') is not null drop table [M1]
go
create table [M1]([id] int,[value] int)
insert [M1]
select 1,2 union all
select 2,3 union all
select 3,4 union all
select 4,5 union all
select 5,6
--> 测试数据[M2]
if object_id('[M2]') is not null drop table [M2]
go
create table [M2]([id] int,[value] int)
insert [M2]
select 1,4 union all
select 2,3 union all
select 4,4 union all
select 5,9
--> 测试数据[M3]
if object_id('[M3]') is not null drop table [M3]
go
create table [M3]([id] int,[value] int)
insert [M3]
select 1,2 union all
select 3,4 union all
select 5,5 union all
select 6,6 union all
select 7,10 union all
select 8,12
--------------生成数据--------------------------
--select * from [M3]
--select * from [M2]
select COALESCE(M1.ID,M2.ID,M3.ID) ID,
M1.value M1,
M2.value M2,
M3.value M3
from [M1]
FULL JOIN [M2] ON M1.ID=M2.ID
FULL JOIN [M3] ON M1.ID=M3.ID
--select * from [NameInfo]
----------------结果----------------------------
/*
ID M1 M2 M3
----------- ----------- ----------- -----------
1 2 4 2
2 3 3 NULL
3 4 NULL 4
4 5 4 NULL
5 6 9 5
6 NULL NULL 6
7 NULL NULL 10
8 NULL NULL 12
*/
-- =================================================================================
/*(36)==============================================================================
/*
使用存储过程插入insert语句
----------------------------------------------------------------
*/
==================================================================================*/
USE mallshop
GO
drop TABLE test
CREATE TABLE test (id INT )
GO
CREATE PROC testSP
AS
SELECT 1 UNION ALL
SELECT 2
GO
INSERT INTO test
EXEC testSP
GO
SELECT * FROM test
/*
id
-----------
1
2
*/
-- =================================================================================
/*(37)==============================================================================
/*
怎么看数据库版本
*/
==================================================================================*/
print @@version
-- =================================================================================
/*(38)==============================================================================
/*
SQL SERVER 和EXCEL的数据导入导出
*/
==================================================================================*/
--/*直接去掉注释*/
--1、在SQL SERVER里查询Excel数据:
---- ======================================================
--SELECT *
--FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
--'Data Source="c:\book1.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...[Sheet1$]
--下面是个查询的示例,它通过用于 Jet 的 OLE DB 提供程序查询 Excel 电子表格。
--SELECT *
--FROM OpenDataSource ( 'Microsoft.Jet.OLEDB.4.0',
-- 'Data Source="c:\Finance\account.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions
---------------------------------------------------------------------------------------------------
--
--2、将Excel的数据导入SQL server :
---- ======================================================
--SELECT * into newtable
--FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
-- 'Data Source="c:\book1.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...[Sheet1$]
--实例:
--SELECT * into newtable
--FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
-- 'Data Source="c:\Finance\account.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions
---------------------------------------------------------------------------------------------------
--/* ======================================================
--3、将SQL SERVER中查询到的数据导成一个Excel文件
---- ======================================================
--T-SQL代码:*/
--EXEC master..xp_cmdshell 'bcp 库名.dbo.表名out c:\Temp.xls -c -q -S"servername" -U"sa" -P""'
--参数:S 是SQL服务器名;U是用户;P是密码
--说明:还可以导出文本文件等多种格式
--实例:EXEC master..xp_cmdshell 'bcp saletesttmp.dbo.CusAccount out c:\temp1.xls -c -q -S"pmserver" -U"sa" -P"sa"'
--EXEC master..xp_cmdshell 'bcp "SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname" queryout C:\ authors.xls -c -Sservername -Usa -Ppassword'
--在VB6中应用ADO导出EXCEL文件代码:
--Dim cn As New ADODB.Connection
--cn.open "Driver={SQL Server};Server=WEBSVR;DataBase=WebMis;UID=sa;WD=123;"
--cn.execute "master..xp_cmdshell 'bcp "SELECT col1, col2 FROM 库名.dbo.表名" queryout E:\DT.xls -c -Sservername -Usa -Ppassword'"
--------------------------------------------------------------------------------------------------
--
--4、在SQL SERVER里往Excel插入数据:
---- ======================================================
--insert into OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
--'Data Source="c:\Temp.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...table1 (A1,A2,A3) values (1,2,3)
--
--T-SQL代码:
--INSERT INTO
--OPENDATASOURCE('Microsoft.JET.OLEDB.4.0',
--'Extended Properties=Excel 8.0;Data source=C:\training\inventur.xls')...[Filiale1$]
--(bestand, produkt) VALUES (20, 'Test')
-- =================================================================================
/*(39)==============================================================================
/*
/*
ID 分数 名称
1 3 A
2 4 A
3 3 B
4 5 A
5 5 B
6 4 A
7 5 C
我想查询的结果是
A ,B,C 的分数分别是3,4,5的各有多少
*/
*/
==================================================================================*/
create table #t
(ID int,分数 int,名称 varchar(10))
insert into #t
select 1,3,'A' union all
select 2,4,'A' union all
select 3,3,'B' union all
select 4,5,'A' union all
select 5,5,'B' union all
select 6,4,'A' union all
select 7,5,'C'
/*方法一:*/
/*使用PIVOT 实现数据表的列转行*/
select 名称,[3] '3分',[4] '4分',[5] '5分'
from #t a
pivot(count(ID) for 分数 in([3],[4],[5])) p
/*
名称 3分 4分 5分
---------- ----------- ----------- -----------
A 1 2 1
B 1 0 1
C 0 0 1
(3 row(s) affected)
*/
/*方法二:*/
SELECT
名称
,SUM(CASE WHEN 分数=3 THEN 1 ELSE 0 END) AS '3分'
,SUM(CASE WHEN 分数=4 THEN 1 ELSE 0 END) AS '4分'
,SUM(CASE WHEN 分数=5 THEN 1 ELSE 0 END) AS '5分'
FROM
#t
GROUP BY
名称
/*
名称 3分 4分 5分
---------- ----------- ----------- -----------
A 1 2 1
B 1 0 1
C 0 0 1
*/
-- =================================================================================
/*(40)======================================================
需求原因:
表 A
Id(单号),Count(序号),InvoiceNumber(发票号码)
A201406001, 1, 120001
A201406003, 1, 120003
A201406003, 2, 120004
A201406003, 3, 120005
求显示成
Id(单号),InvoiceNumber(发票号码)
A201406001, 120001
A201406003, 120003/120004/120005
==========================================================*/
/*方法一:*/
--> 测试数据[A]
if object_id('[A]') is not null drop table [A]
go
create table [A]([Id] nvarchar(20),[Count] int,[InvoiceNumber] int)
insert [A]
select 'A201406001',1,120001 union all
select 'A201406003',1,120003 union all
select 'A201406003',2,120004 union all
select 'A201406003',3,120005
--------------生成数据--------------------------
select a.[Id],
stuff((select ','+CAST([InvoiceNumber] AS VARCHAR(30)) from [A] b
where b.[Id]=a.[Id]
for xml path('')),1,1,'') [InvoiceNumber]
from [A] a
group by a.[Id]
----------------结果----------------------------
/*
Id InvoiceNumber
-------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
A201406001 120001
A201406003 120003,120004,120005
*/
/*方法二:*/
if object_id('F_Str') is not null
drop function F_Str
go
create function F_Str(@Col1 NVARCHAR(100))
returns nvarchar(100)
as
begin
declare @S nvarchar(100)
select @S=isnull(@S+',','')+CAST([InvoiceNumber] AS NVARCHAR(100)) from [A] where [Id]=@Col1
return @S
end
go
Select distinct [Id],[InvoiceNumber]=dbo.F_Str([Id]) from [A]
/*
Id InvoiceNumber
-------------------- ----------------------------------------------------------------------------------------------------
A201406001 120001
A201406003 120003,120004,120005
*/
-- ========================================================
/*(41)======================================================
需求原因:有这样一个表:
customer_id registration_year
1 2014
2 2012
2 2014
2 2014
3 2012
3 2013
3 2014
2 2014
2 2005
希望得到的结果集是统计各个customer本年度登记的次数以及往年登记的次数(customer_id不重复):
customer_id 本年度数量统计(2014) 往年数量统计(<2014)
1 1 0
2 3 2
3 1 2
==========================================================*/
--> 测试数据[huang]
if object_id('[huang]') is not null drop table [huang]
go
create table [huang]([customer_id] int,[registration_year] int)
insert [huang]
select 1,2014 union all
select 2,2012 union all
select 2,2014 union all
select 2,2014 union all
select 3,2012 union all
select 3,2013 union all
select 3,2014 union all
select 2,2014 union all
select 2,2005
--------------生成数据--------------------------
/*方法一:*/
DECLARE @year INT --本年
SET @year=(SELECT MAX([registration_year]) from huang )--取表中最大一年
select customer_id,COUNT(CASE WHEN [registration_year]=@year THEN 1 ELSE NULL END )[ 本年度数量统计(2014)],--统计本年没必要大于等于
COUNT(CASE WHEN [registration_year]<@year THEN 1 ELSE NULL END )[往年数量统计(<2014)]
from [huang]
GROUP BY customer_id
----------------结果----------------------------
/*
customer_id 本年度数量统计(2014) 往年数量统计(<2014)
----------- -------------- -------------
1 1 0
2 3 2
3 1 2
*/
-- ========================================================
/*(42)======================================================
需求原因:SID CID score
1 1 49
1 2 64
2 1 76
2 2 75
3 1 100
3 2 92
SID是学生编号,CID是课程编号,求
1 课程编号为1的分数比课程编号为2的分数多的学生编号(SID)
2 学过课程 1 的 又学过课程 2 的 学生编号
==========================================================*/
create table xo
(SID int,CID int,score int)
insert into xo
select 1,1,49 union all
select 1,2,64 union all
select 2,1,76 union all
select 2,2,75 union all
select 3,1,100 union all
select 3,2,92
-- 1 课程编号为1的分数比课程编号为2的分数多的学生编号(SID)
select [SID]
from xo
group by [SID]
having max(case when CID=1 then score else 0 end)>
max(case when CID=2 then score else 0 end)
/*
SID
-----------
2
3
(2 row(s) affected)
*/
-- 2 学过课程 1 的 又学过课程 2 的 学生编号
select [SID]
from xo
where CID in(1,2)
group by [SID]
having count(1)=2
/*
SID
-----------
1
2
3
(3 row(s) affected)
*/
-- =========================================================
/*(43)======================================================
需求原因:
如题有一个表A:
A01(序号) A02(编号) A03(条码)
-----------------------------------------------
001 a01 C1406190008
002 a03
003 a04
...
想根据最后表的最后一个条码字段,依次往后产生条码,
比如A03最后一个条码是C1406190008,
那么产生的其它的条码应该往下排C1406190009,C1406190010...
==========================================================*/
--> 测试数据[huang]
create table 表A
(A01 varchar(10),A02 varchar(10),A03 varchar(20))
insert into 表A
select '001','a01','C1406190008' union all
select '002','a03','' union all
select '003','a04',''
/*方法一:*/
-- 更新
update a
set a.A03=left(b.x,1)+rtrim(cast(stuff(b.x,1,1,'') as bigint)+b.r)
from 表A a
inner join
(select a.A01,
(select top 1 A03 from 表A b where b.A01 row_number() over(order by a.A01) 'r'
from 表A a
where a.A03='') b on a.A01=b.A01
-- 结果
select * from 表A
/*
A01 A02 A03
---------- ---------- --------------------
001 a01 C1406190008
002 a03 C1406190009
003 a04 C1406190010
(3 row(s) affected)
*/
/*方法二:*/
--> 测试数据[huang]
if object_id('[huang]') is not null drop table [huang]
go
create table [huang]([A01] nvarchar(6),[A02] nvarchar(6),[A03] nvarchar(22))
insert [huang]
select '001','a01','C1406190008' union all
select '002','a03',null union all
select '003','a04',null
--------------生成数据--------------------------
;WITH CTE AS (
select [A01],[A02],[A03],ROW_NUMBER()OVER(ORDER BY A01)ID--CASE WHEN [A03] IS NULL THEN 'C'+CAST(CAST(SUBSTRING([A03],2,LEN([A03])) AS INT )+1 AS VARCHAR(30)) ELSE [A03] END [A03]
from [huang]
)
,CTE2 AS
(
SELECT A01,A02,CAST (A03 AS VARCHAR(31)) [A03],ID
FROM CTE WHERE ID =(SELECT MAX(ID) FROM CTE WHERE A03 IS NOT NULL )
UNION ALL
SELECT A.A01,A.A02,'C'+CAST(CAST(SUBSTRING(B.[A03],2,LEN(B.[A03])) AS INT )+1 AS VARCHAR(30)) [A03],A.ID
FROM CTE A INNER JOIN CTE2 B ON A.ID=B.ID+1
)
SELECT A01,A02,A03
FROM CTE2
----------------结果----------------------------
/*
A01 A02 A03
------ ------ -------------------------------
001 a01 C1406190008
002 a03 C1406190009
003 a04 C1406190010
*/
-- =========================================================
------------------------------以上总结时间:2015-06-06 14:21:12.307
--CSDN > CSDN论坛 > MS-SQL Server > 应用实例
/*(44)======================================================
需求原因:
sqlserver中截取字符串的问题
==========================================================*/
/*方法一:*/
declare @str varchar(1000);
select @str='2255&2297&-0.4500&0.3300';
select substring(a.s,b.number,charindex('&',a.s+'&',b.number)-b.number) 'str'
from
(select @str 's') a
inner join
master.dbo.spt_values b
on
b.[type]='P'
and
b.number between 1 and len(a.s)
and
substring('&'+a.s,b.number,1)='&'
/*
str
----------------------------
2255
2297
-0.4500
0.3300
(4 row(s) affected)
*/
/*方法二:*/
declare @str varchar(200);
select @str='2255&2297&-0.4500&0.3300';
SELECT ROW_NUMBER() OVER(ORDER BY @@SERVERNAME) AS ID,
t.c.value('.','Varchar(10)') AS col
from
(SELECT CAST(''+REPLACE(@Str,'&','')+'' AS XML ).query('.') AS name) AS a
CROSS APPLY
a.name.nodes('/x') T(c)
-- =========================================================
/*(45)======================================================
需求原因:
Table
ID ProjectID ParentProjectID Projectname
1 0 Null 平台0
2 1 Null 平台1
3 2 0 项目0-1
4 3 2 项目0-1-1
5 4 3 项目0-1-1-1
6 5 3 项目0-1-1-2
7 6 1 项目1-1
8 7 6 项目1-1-1
9 8 7 项目1-1-1-1
我如何通过sql语句去循环查询,平台0下面的所有归属于平台0的项目,如何查询归于项目0-1 下面的所有项目。
==========================================================*/
if object_id('tempdb..tab_test','U') is not null drop table tab_test
go
CREATE TABLE tab_test
(
ID INT IDENTITY(1,1),
ProjectId INT,
ParentProjectID NVARCHAR(20),
Projectname NVARCHAR(255)
)
go
INSERT INTO dbo.tab_test(ProjectId,ParentProjectID,Projectname)
SELECT 0,NULL,N'平台0' UNION ALL
SELECT 1,NULL,N'平台1' UNION ALL
SELECT 2,0,N'项目0-1' UNION ALL
SELECT 3,2,N'项目0-1-1' UNION ALL
SELECT 4,3,N'项目0-1-1-1' UNION ALL
SELECT 5,3,N'项目0-1-1-2' UNION ALL
SELECT 6,1,N'项目1-1' UNION ALL
SELECT 7,6,N'项目1-1-1' UNION ALL
SELECT 8,7,N'项目1-1-1-1'
go
/*方法一:*/
;WITH t1 AS
(
SELECT * FROM tab_test WHERE ProjectId = 0 --查询所有平台0及下级
UNION ALL
SELECT tab_test.* FROM tab_test INNER JOIN t1 ON tab_test.ParentProjectID = t1.ProjectId
)
SELECT * FROM t1
/*
查询结果
1
0
NULL
平台0
3
2
0
项目0-1
4
3
2
项目0-1-1
5
4
3
项目0-1-1-1
6
5
3
项目0-1-1-2
*/
if object_id('tempdb..#TB1','U') is not null drop table #TB1
go
CREATE TABLE #TB1
(
ID INT
, ProjectID INT
,ParentProjectID INT
,Projectname NVARCHAR(200)
)
INSERT INTO #TB1
SELECT 1, 0 , Null , N'平台0' union all
SELECT 2 , 1 , Null , N'平台1' union all
SELECT 3 , 2 , 0, N'项目0-1' union all
SELECT 4, 3, 2 , N'项目0-1-1' union all
SELECT 5, 4 , 3, N'项目0-1-1-1' union all
SELECT 6, 5, 3, N'项目0-1-1-2' union all
SELECT 7, 6, 1, N'项目1-1' union all
SELECT 8, 7 , 6 , N'项目1-1-1' union all
SELECT 9, 8, 7 , N'项目1-1-1-1'
/*方法二:*/
DECLARE @Projectname NVARCHAR(20);
Set @Projectname=N'平台0'
;WITH test AS
(
SELECT * FROM #TB1 WHERE Projectname=@Projectname
UNION ALL
SELECT A.*
FROM #TB1 AS A
JOIN test AS B ON A.ParentProjectID=B.ProjectID
)
SELECT * FROM test
-- =========================================================
/*(46)======================================================
需求原因:sql 某一列连续出现某个值,求最大连续数
==========================================================*/
if object_id('[t]') is not null drop table t
go
create table t (
a int ,
b int,
c int,
d int)
insert into t(a,b,c,d) values(1,0,1,8)
insert into t(a,b,c,d) values(2,0,7,7)
insert into t(a,b,c,d) values(0,1,2,0)
insert into t(a,b,c,d) values(1,0,0,0)
insert into t(a,b,c,d) values(0,0,1,0)
insert into t(a,b,c,d) values(0,2,5,6)
insert into t(a,b,c,d) values(1,0,0,0)
declare @a int,
@b int,
@c int,
@d int,
@a0 int,
@b0 int,
@c0 int,
@d0 int,
@aCnt int,
@bCnt int,
@cCnt int,
@dCnt int
set @a0=0
set @b0=0
set @c0=0
set @d0=0
set @aCnt=0
set @bCnt=0
set @cCnt=0
set @dCnt=0
declare c cursor for select * from t
open c
fetch from c into @a, @b, @c, @d
while(@@fetch_status = 0) --游标读取下一条数据是否成功。
begin
--处理a列
if @a=0
begin
set @a0=@a0+1
end
else
begin
set @a0=0
end
if @a0>@aCnt
begin
set @aCnt=@aCnt+1
end
--处理b列
if @b=0
begin
set @b0=@b0+1
end
else
begin
set @b0=0
end
if @b0>@bCnt
begin
set @bCnt=@bCnt+1
end
--处理c列
if @c=0
begin
set @c0=@c0+1
end
else
begin
set @c0=0
end
if @c0>@cCnt
begin
set @cCnt=@cCnt+1
end
--处理d列
if @d=0
begin
set @d0=@d0+1
end
else
begin
set @d0=0
end
if @d0>@dCnt
begin
set @dCnt=@dCnt+1
end
fetch next from c into @a, @b, @c, @d
end;
close c
deallocate c
select @aCnt, @bCnt, @cCnt, @dCnt
/*方法二:*/
if object_id('[Test]') is not null drop table test
CREATE TABLE Test(aa INT,bb INT,cc INT,dd INT)
GO
INSERT INTO Test(aa,bb,cc,dd)
SELECT 1,0,1,8 UNION ALL
SELECT 2,0,7,7 UNION ALL
SELECT 0,1,2,0 UNION ALL
SELECT 1,0,0,0 UNION ALL
SELECT 0,0,1,0 UNION ALL
SELECT 0,2,5,6 UNION ALL
SELECT 1,0,0,0
GO
CREATE PROC dbo.myTest
AS
BEGIN
DECLARE @aa INT,@bb INT,@cc INT,@dd INT,@RowCNT INT,@Fo INT,
@aaZero INT,@bbZero INT,@ccZero INT,@ddZero INT,
@aaZeroMax INT,@bbZeroMax INT,@ccZeroMax INT,@ddZeroMax INT;
SELECT IDENTITY(INT,1,1) AS ID,aa,bb,cc,dd INTO #Test FROM dbo.Test;
SELECT @aaZero = 0,@bbZero = 0,@ccZero = 0,@ddZero = 0,
@aaZeroMax = 0,@bbZeroMax = 0,@ccZeroMax = 0,@ddZeroMax = 0;
SELECT @RowCNT = COUNT(*),@Fo = 1 FROM #Test;
WHILE @Fo <= @RowCNT
BEGIN
SELECT @aa = aa,@bb = bb,@cc = cc,@dd = dd FROM #Test WHERE ID = @Fo;
-- aa
SET @aaZero = CASE @aa WHEN 0 THEN @aaZero + 1 ELSE 0 END;
SET @aaZeroMax = CASE WHEN @aaZero > @aaZeroMax THEN @aaZero ELSE @aaZeroMax END;
-- bb
SET @bbZero = CASE @bb WHEN 0 THEN @bbZero + 1 ELSE 0 END;
SET @bbZeroMax = CASE WHEN @bbZero > @bbZeroMax THEN @bbZero ELSE @bbZeroMax END;
-- cc
SET @ccZero = CASE @cc WHEN 0 THEN @ccZero + 1 ELSE 0 END;
SET @ccZeroMax = CASE WHEN @ccZero > @ccZeroMax THEN @ccZero ELSE @ccZeroMax END;
-- dd
SET @ddZero = CASE @dd WHEN 0 THEN @ddZero + 1 ELSE 0 END;
SET @ddZeroMax = CASE WHEN @ddZero > @ddZeroMax THEN @ddZero ELSE @ddZeroMax END;
SET @Fo = @Fo + 1;
END
DROP TABLE #Test;
SELECT @aaZeroMax aa,@bbZeroMax bb,@ccZeroMax cc,@ddZeroMax dd;
END
-- =========================================================
/*(47)======================================================
需求原因:单位表, 产品表, 出库单表, 出库单明细表 4张表的结构,
后面一个sql语句是我按月统计我已经实现了!
现在我要实现不但是要按月来统计, 还要按销售单位来统计,
说的通俗一点就是 一个产品 每一个月出库了多少,
都卖给了哪些单位并统计出卖了多少! 卖出了单位是动态的,
大家可以结合我前面按月统计帮我实现了, 我的sql版本是2005,
只有这么一些分了, 先谢谢大家了!
最好是跟按月统计的查询写在一个查询语句里面做一个综合查询,
下面我给出我要导出Excel的格式!
==========================================================*/
USE mallshop
GO
/****** 对象: Table [dbo].[business_SaleDirectOrderDetail]
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
单位表*/
DROP TABLE [bs_CompanyInfo]
CREATE TABLE [dbo].[bs_CompanyInfo](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CustomerID] [int] NULL,
[CompanyCode] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL CONSTRAINT [DF_bs_CompanyInfo_CompanyCode] DEFAULT (''),
[SimpleName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[FullName] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_bs_CompanyInfo] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'客户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_CompanyInfo', @level2type=N'COLUMN',@level2name=N'CustomerID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公司编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_CompanyInfo', @level2type=N'COLUMN',@level2name=N'CompanyCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公司简称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_CompanyInfo', @level2type=N'COLUMN',@level2name=N'SimpleName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公司全称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_CompanyInfo', @level2type=N'COLUMN',@level2name=N'FullName'
go
--插入数据
insert into [bs_CompanyInfo] values(1,'No001','test1','Test1 Company')
insert into [bs_CompanyInfo] values(1,'No002','test2','Test2 Company')
insert into [bs_CompanyInfo] values(1,'No003','test3','Test3 Company')
select* from [bs_CompanyInfo]
--产品表
DROP TABLE [bs_Products]
CREATE TABLE [dbo].[bs_Products](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CategoryID] [int] NULL,
[TrademarkID] [int] NULL,
[CatenaID] [int] NULL,
[Barcode] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
[ProductCode] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
[Name_CHS] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_bs_Products] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属大类ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_Products', @level2type=N'COLUMN',@level2name=N'CategoryID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属品牌ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_Products', @level2type=N'COLUMN',@level2name=N'TrademarkID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品系列ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_Products', @level2type=N'COLUMN',@level2name=N'CatenaID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_Products', @level2type=N'COLUMN',@level2name=N'ProductCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'中文名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'bs_Products', @level2type=N'COLUMN',@level2name=N'Name_CHS'
--插入数据
insert into [bs_Products] values(1,1,1,'N0001','No000001','产品一')
insert into [bs_Products] values(2,2,1,'N0002','No000002','产品二')
insert into [bs_Products] values(1,1,1,'N0003','No000003','产品三')
insert into [bs_Products] values(1,1,1,'N0004','No000004','产品四')
insert into [bs_Products] values(1,1,1,'N0005','No000005','产品五')
insert into [bs_Products] values(2,2,1,'N0006','No000006','产品六')
insert into [bs_Products] values(1,1,1,'N0007','No000007','产品七')
insert into [bs_Products] values(1,1,1,'N0008','No000008','产品八')
GO
select* from [bs_Products]
--出库单
DROP TABLE [dbo].[business_SaleDirectOrder]
CREATE TABLE [dbo].[business_SaleDirectOrder](
[OrderCode] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
[Sale_OrderCode] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[CompanyId] [int] NULL,
[RegionID] [int] NULL,
[WarehouseId] [int] NULL,
CreateDate datetime NULL,
[LargeCategoryId] [int] NULL,
CONSTRAINT [PK_business_SaleDirectOrder] PRIMARY KEY CLUSTERED
(
[OrderCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'直销出库单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrder', @level2type=N'COLUMN',@level2name=N'OrderCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'销售订单号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrder', @level2type=N'COLUMN',@level2name=N'Sale_OrderCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'客户公司id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrder', @level2type=N'COLUMN',@level2name=N'CompanyId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'仓库ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrder', @level2type=N'COLUMN',@level2name=N'WarehouseId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品大类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrder', @level2type=N'COLUMN',@level2name=N'LargeCategoryId'
--插入数据
insert into [business_SaleDirectOrder] values('CA-MS001','Sale_001',1,1,1,1)
insert into [business_SaleDirectOrder] values('CA-MS002','Sale_002',2,1,1,1)
GO
--出库单详细信息
DROP TABLE [dbo].[business_SaleDirectOrderDetail]
CREATE TABLE [dbo].[business_SaleDirectOrderDetail](
[ID] [int] IDENTITY(1,1) NOT NULL,
[OrderCode] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[ProudctType] [int] NULL,
[ProductId] [int] NULL,
[PositionID] [int] NULL,
[BatchNo] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
[Used] [decimal](18, 0) NULL,
[Diushi] [decimal](18, 0) NULL,
[Bad] [decimal](18, 0) NULL,
CONSTRAINT [PK_business_SaleDirectOrderDetail] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
select* from [business_SaleDirectOrderDetail]
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'直销出库单编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrderDetail', @level2type=N'COLUMN',@level2name=N'OrderCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0-成套,1-附加,2-工具' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrderDetail', @level2type=N'COLUMN',@level2name=N'ProudctType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrderDetail', @level2type=N'COLUMN',@level2name=N'ProductId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'货区' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrderDetail', @level2type=N'COLUMN',@level2name=N'PositionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品批号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrderDetail', @level2type=N'COLUMN',@level2name=N'BatchNo'
go
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'实用数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrderDetail', @level2type=N'COLUMN',@level2name=N'Used'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'遗失数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrderDetail', @level2type=N'COLUMN',@level2name=N'Diushi'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'损坏数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'business_SaleDirectOrderDetail', @level2type=N'COLUMN',@level2name=N'Bad'
--插入数据
--出库单CA-MS001 里面有产品ID 1 2 3 4 4种产品
insert into [business_SaleDirectOrderDetail] values('CA-MS001',1,1,1,'B0001',4,1,0)
insert into [business_SaleDirectOrderDetail] values('CA-MS001',1,2,1,'B0002',5,1,0)
insert into [business_SaleDirectOrderDetail] values('CA-MS001',1,3,1,'B0003',3,1,0)
insert into [business_SaleDirectOrderDetail] values('CA-MS001',1,4,1,'B0003',2,1,0)
insert into [business_SaleDirectOrderDetail] values('CA-MS001',1,5,1,'B00055',1,0,0)
--出库单CA-MS002 里面有产品ID 1 3 2种产品
insert into [business_SaleDirectOrderDetail] values('CA-MS002',1,1,1,'B0001',2,1,0)
insert into [business_SaleDirectOrderDetail] values('CA-MS002',1,3,1,'B0005',1,0,0)
--按月来统计
select * from (select b.ProductId,d.FullName,
sum(case month(a.CreateDate) when '1' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month1'
,sum(case month(a.CreateDate) when '2' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month2'
,sum(case month(a.CreateDate) when '3' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month3'
,sum(case month(a.CreateDate) when '4' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month4'
,sum(case month(a.CreateDate) when '5' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month5'
,sum(case month(a.CreateDate) when '6' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month6'
,sum(case month(a.CreateDate) when '7' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month7'
,sum(case month(a.CreateDate) when '8' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month8'
,sum(case month(a.CreateDate) when '9' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month9'
,sum(case month(a.CreateDate) when '10' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month10'
,sum(case month(a.CreateDate) when '11' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month11'
,sum(case month(a.CreateDate) when '12' then b.used + b.DiuShi + b.Bad else 0 end) as 'Month12'
from business_SaleDirectOrder as a
left join business_SaleDirectOrderDetail as b on a.OrderCode = b.OrderCode
left join bs_CompanyInfo as d on a.CompanyID = d.ID
group by b.ProductId, d.FullName) a
left join dbo.bs_Products b on a.ProductId = b.id
--2015-06-06 17:41:17.150今天看不懂了
--DECLARE @Sql VARCHAR(MAX),@Sql1 VARCHAR(MAX)
--SELECT @Sql=ISNULL(@Sql+',','')+'['+B.FullName+']' FROM business_SaleDirectOrder AS A JOIN bs_CompanyInfo AS B ON A.CompanyID=B.ID GROUP BY FullName
--
--SELECT @Sql1=ISNULL(@Sql1+',','')+'ISNULL('+'['+B.FullName+']'+',0) AS '+'['+B.FullName+']' FROM business_SaleDirectOrder AS A
--
JOIN bs_CompanyInfo AS B ON A.CompanyID=B.ID GROUP BY FullName
--SELECT @Sql='select A.*,'+@Sql1+'
--
from (select * from (select b.ProductId,d.FullName,d.ID AS CompanyID,
--
sum(case month(a.CreateDate) when ''1'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month1''
--
,sum(case month(a.CreateDate) when ''2'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month2''
--
,sum(case month(a.CreateDate) when ''3'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month3''
--
,sum(case month(a.CreateDate) when ''4'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month4''
--
,sum(case month(a.CreateDate) when ''5'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month5''
--
,sum(case month(a.CreateDate) when ''6'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month6''
--
,sum(case month(a.CreateDate) when ''7'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month7''
--
,sum(case month(a.CreateDate) when ''8'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month8''
--
,sum(case month(a.CreateDate) when ''9'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month9''
--
,sum(case month(a.CreateDate) when ''10'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month10''
--
,sum(case month(a.CreateDate) when ''11'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month11''
--
,sum(case month(a.CreateDate) when ''12'' then b.used + b.DiuShi + b.Bad else 0 end) as ''Month12''
--
from business_SaleDirectOrder as a
--
left join business_SaleDirectOrderDetail as b on a.OrderCode = b.OrderCode
--
left join bs_CompanyInfo as d on a.CompanyID = d.ID
--
group by b.ProductId, d.FullName,d.ID ) a
--
left join dbo.bs_Products b on a.ProductId = b.id) AS A
--
JOIN(
--
SELECT ProductId,ProductCode,Barcode,CompanyID,'+@Sql1+'
--
FROM(
--
select b.ProductId,a.CompanyID,c.fullname,d.ProductCode,d.Barcode,
--
SUM(b.used + b.DiuShi + b.Bad) amt
--
from business_SaleDirectOrder as a
--
left join business_SaleDirectOrderDetail as b on a.OrderCode = b.OrderCode
--
LEFT JOIN bs_CompanyInfo AS c ON a.CompanyID=c.Id
--
LEFT JOIN bs_Products AS d ON b.ProductId=d.id
--
group by b.ProductId,a.CompanyID,c.fullname,d.ProductCode,d.Barcode) AS a
--
PIVOT(SUM(amt) FOR fullname IN('+@Sql+')) p) AS B ON A.ProductId=B.ProductId and A.CompanyID=B.CompanyID'
--EXEC(@Sql)
-- =========================================================
/*(48)======================================================
需求原因:
横向纵向
==========================================================*/
--> 测试数据:[表1]
if object_id('[表1]') is not null drop table [表1]
go
create table [表1]([col] varchar(1))
insert [表1]
select 'a' union all
select 'b' union all
select 'e' union all
select 'f'
--> 测试数据:[表2]
if object_id('[表2]') is not null drop table [表2]
go
create table [表2]([col] varchar(1))
insert [表2]
select 'b' union all
select 'd' union all
select 'e' union all
select 'd'
--> 测试数据:[表3]
if object_id('[表3]') is not null drop table [表3]
go
create table [表3]([col] varchar(1))
insert [表3]
select 'a' union all
select 'c' union all
select 'd' union all
select 'a'
--> 测试数据:[表4]
if object_id('[表4]') is not null drop table [表4]
go
create table [表4]([col] varchar(1))
insert [表4]
select 'c' union all
select 'a' union all
select 'b' union all
select 'c'
--------------开始查询--------------------------
declare @s varchar(1000)
select @s=isnull(@s+' ' , '')+col from (select * from [表1]
union
select * from [表2]
union
select * from [表3]
union
select * from [表4]) as t
select @s
----------------结果----------------------------
/* ---------------------------------------------
a b c d e f
(1 行受影响)
*/
-----------------纵向
--> 测试数据:[表1]
if object_id('[表1]') is not null drop table [表1]
go
create table [表1]([col] varchar(1))
insert [表1]
select 'a' union all
select 'b' union all
select 'e' union all
select 'f'
--> 测试数据:[表2]
if object_id('[表2]') is not null drop table [表2]
go
create table [表2]([col] varchar(1))
insert [表2]
select 'b' union all
select 'd' union all
select 'e' union all
select 'd'
--> 测试数据:[表3]
if object_id('[表3]') is not null drop table [表3]
go
create table [表3]([col] varchar(1))
insert [表3]
select 'a' union all
select 'c' union all
select 'd' union all
select 'a'
--> 测试数据:[表4]
if object_id('[表4]') is not null drop table [表4]
go
create table [表4]([col] varchar(1))
insert [表4]
select 'c' union all
select 'a' union all
select 'b' union all
select 'c'
--------------开始查询--------------------------
select * from [表1]
union
select * from [表2]
union
select * from [表3]
union
select * from [表4]
----------------结果----------------------------
/* col
----
a
b
c
d
e
f
(6 行受影响)
*/
-- =========================================================
/*(49)======================================================
需求原因:
已完成] int,[进行中] int,[已超期] int,[已暂停] int,[未开始]
0
5
0
0
0
转化成
已完成 0
进行中 5
已超期 0
已暂停 0
未开始 0
==========================================================*/
IF OBJECT_ID('Test') IS NOT NULL
DROP TABLE Test
GO
CREATE TABLE Test([已完成] int,[进行中] int,[已超期] int,[已暂停] int,[未开始] int)
INSERT INTO Test SELECT 0,5,0,0,0
select * from Test
-----------------------------------------------------------查询-------------------------------------------------------------------------
;WITH t AS
(
SELECT '已完成' AS [A]
UNION ALL SELECT '进行中' AS [A]
UNION ALL SELECT '已超期' AS [A]
UNION ALL SELECT '已暂停' AS [A]
UNION ALL SELECT '未开始' AS [A]
)
SELECT a.*,CASE a.A WHEN '已完成' THEN b.[已完成] WHEN '进行中' THEN b.[进行中] WHEN '已超期' THEN b.[已超期] WHEN '已暂停' THEN b.[已暂停] WHEN '未开始' THEN b.[未开始] END B FROM t a,dbo.Test b
-----------------------------------------------------------结果---------------------------------------------------------------------------------
/*
A B
------ -----------
已完成 0
进行中 5
已超期 0
已暂停 0
未开始 0
(5 行受影响)
*/
-- =========================================================
/*(50)======================================================
需求原因:
fid userid deptid rangeid range rangedate groupid neworder
978
11272
d_155
1
A
2014-03-24
1
1
1024
12911
d_155
1
A
2014-03-24
2
1
1032
11285
d_155
1
A
2014-03-24
4
2
1085
11287
d_155
1
A
2014-03-24
4
1
979
11272
d_155
1
A
2014-03-25
1
NULL
1025
12911
d_155
1
A
2014-03-25
2
1
1033
11285
d_155
1
A
2014-03-25
4
2
1086
11287
d_155
1
A
2014-03-25
4
1
表如上:
现在要查找出同一天中同一个部门同一组里只有一条记录的行
例如:部门 d_155在rangedate为2014-03-24,groupid为1,2的就是满足条件的记录,
groupid为4的有两条记录,则不满足条件,不要查询出来。
==========================================================*/
/*方法一:*/
--> 测试数据: [ta]
if object_id('[ta]') is not null
drop table [ta]
go
create table [ta] ([fid] int,[userid] int,[deptid] varchar(5),[rangeid] int,[range] varchar(1),[rangedate] datetime,[groupid] int,[neworder] int)
insert into [ta]
select 978,11272,'d_155',1,'A','2014-03-24',1,1 union all
select 1024,12911,'d_155',1,'A','2014-03-24',2,1 union all
select 1032,11285,'d_155',1,'A','2014-03-24',4,2 union all
select 1085,11287,'d_155',1,'A','2014-03-24',4,1 union all
select 979,11272,'d_155',1,'A','2014-03-25',1,null union all
select 1025,12911,'d_155',1,'A','2014-03-25',2,1 union all
select 1033,11285,'d_155',1,'A','2014-03-25',4,2 union all
select 1086,11287,'d_155',1,'A','2014-03-25',4,1
select *
from ta s
where not exists(select 1 from ta where deptid=s.deptid and rangedate=s.rangedate and groupid=s.groupid and fid!=s.fid)
--978
11272
d_155
1
A
2014-03-24 00:00:00.000
1
1
--1024
12911
d_155
1
A
2014-03-24 00:00:00.000
2
1
--979
11272
d_155
1
A
2014-03-25 00:00:00.000
1
NULL
--1025
12911
d_155
1
A
2014-03-25 00:00:00.000
2
1
/*方法二:*/
--sql2005
if object_id('oa_schearrange') is not null
drop table oa_schearrange
go
--创建表
create table oa_schearrange(fid varchar(20),userid varchar(10),deptid varchar(10),rangeid varchar(10),range varchar(10),
rangedate datetime,groupid varchar(10),neworder varchar(20))
go
--插入测试数据
insert oa_schearrange
select '978', '11272', 'd_155', '1', 'A', '2014-03-24', '1', '1' union all
select '1024', '12911', 'd_155', '1', 'A', '2014-03-24', '2', '1'union all
select '1032', '11285', 'd_155', '1', 'A', '2014-03-24', '4', '2'union all
select '1085', '11287', 'd_155', '1', 'A', '2014-03-24', '4', '1'union all
select '979', '11272' , 'd_155', '1', 'A', '2014-03-25', '1', NULL union all
select '1025', '12911', 'd_155', '1', 'A', '2014-03-25', '2', '1'union all
select '1033', '11285', 'd_155' , '1', 'A', '2014-03-25', '4', '2'union all
select '1086', '11287', 'd_155', '1', 'A', '2014-03-25', '4', '1'
--查询
select a.* from oa_schearrange a inner join (select deptid,rangedate,groupid from oa_schearrange group by deptid,rangedate,groupid having count(*)=1)b
on a.deptid=b.deptid and a.rangedate=b.rangedate and a.groupid=b.groupid
-- =========================================================
/*(51)======================================================
需求原因:
A表中的字段A1为字符型的,内容如下:
20140325115758777
20140326162745890
20140331124545327
20140404125612893
怎么将此字符串转换成日期型呢,格式如YYYY-MM-DD HH24:MI:SS,我试了
select convert(datetime,left(A.A1,8)) FROM A
结果如下:
2014-03-25 00:00:00.000
2014-03-26 00:00:00.000
2014-03-31 00:00:00.000
2014-04-04 00:00:00.000
如果用
select convert(datetime,left(A.A1,17)) FROM A
则会报错:从字符串转换日期和/或时间时,转换失败。求指点,是否是函数使用的不对?
==========================================================*/
/*方法一:*/
DECLARE @A VARCHAR(30)
SET @a='20140325115758777'
SELECT SUBSTRING(@a,1,4)+'-'+SUBSTRING(@a,5,2)+'-'+SUBSTRING(@a,7,2)+' '+SUBSTRING(@a,9,2)+':'+SUBSTRING(@a,11,2)+':'+SUBSTRING(@a,13,2)+'.'+SUBSTRING(@a,15,LEN(@a))
--> 测试数据[A]
if object_id('[A]') is not null drop table [A]
go
create table [A]([A1] VARCHAR(30))
insert [A]
select 20140325115758777 union all
select 20140326162745890 union all
select 20140331124545327 union all
select 20140404125612893
--------------生成数据--------------------------
select SUBSTRING(A1,1,4)+'-'+SUBSTRING(A1,5,2)+'-'+SUBSTRING(A1,7,2)+' '+SUBSTRING(A1,9,2)+':'+SUBSTRING(A1,11,2)+':'+SUBSTRING(A1,13,2)+'.'+SUBSTRING(A1,15,LEN(A1))A1
from [A]
----------------结果----------------------------
/*
A1
--------------------------------------------------
2014-03-25 11:57:58.777
2014-03-26 16:27:45.890
2014-03-31 12:45:45.327
2014-04-04 12:56:12.893
*/
SELECT CASE WHEN ISDATE('20140325115758777')=0 THEN N'不能转换成日期类型' ELSE N'能转换成日期类型' END
/*
---------
不能转换成日期类型
*/
SELECT CASE WHEN ISDATE('20140325')=0 THEN N'不能转换成日期类型' ELSE N'能转换成日期类型' END
/*
---------
能转换成日期类型
*/
-- =========================================================
/*(52)======================================================
需求原因:
Name num1 num2 num 3
张三 2 2 2
李四 4 4 4
王二 6 6 6
老大 0 4 12
我要得到的结果是
Name num1 num2 num 3 AVG_Y
张三 2 2 2 2
李四 4 4 4 4
王二 6 6 6 6
老大 0 4 12 8
AVG_X 4 4 6 4.7
==========================================================*/
create table u01
(Name varchar(10),num1 int,num2 int,num3 int)
insert into u01
select '张三',2,2,2 union all
select '李四',4,4,4 union all
select '王二',6,6,6 union all
select '老大',0,4,12
/*方法一:*/
with t as
(select Name,num1,num2,num3,
(num1+num2+num3)/
(case when num1<>0 then 1 else 0 end+
case when num2<>0 then 1 else 0 end+
case when num3<>0 then 1 else 0 end) 'AVG_Y'
from u01)
select Name,num1,num2,num3,AVG_Y from t
union all
select 'AVG_X',
sum(num1)/sum(case when num1<>0 then 1 else 0 end),
sum(num2)/sum(case when num2<>0 then 1 else 0 end),
sum(num3)/sum(case when num3<>0 then 1 else 0 end),
cast((sum(num1)/sum(case when num1<>0 then 1 else 0 end)+
sum(num2)/sum(case when num2<>0 then 1 else 0 end)+
sum(num3)/sum(case when num3<>0 then 1 else 0 end))/3.0 as decimal(5,1))
from t
/*
Name num1 num2 num3 AVG_Y
---------- ----------- ----------- ----------- ---------
张三 2 2 2 2.0
李四 4 4 4 4.0
王二 6 6 6 6.0
老大 0 4 12 8.0
AVG_X 4 4 6 4.7
(5 row(s) affected)
*/
-- =========================================================
/*(53)======================================================
需求原因:
一个两个字段
id city
1 大连,北京,上海
我sql语句需要传入城市参数,判断是否在city这个字段里包含
比如传入‘广州’就返回不存在,传入‘上海’就返回存在
==========================================================*/
if object_id('[tb]') is not null drop table tb
create table tb(id int,city varchar(50) )
insert into tb values(1,'大连,北京,上海')
DECLARE @a NVARCHAR(200)
Set @a=N'大连,北京,上海'
SELECT CHARINDEX(N'上海',@a)
select * from tb
where charindex(','+'上海'+',',city)>0
-- =========================================================
/*(54)======================================================
需求原因:
首先对需求进行描述:该存储过程不会涉及到表的操作,得到1到12月每个月的金额。
需求详情:给出参数1、每年的金额;2、开始时间;3、结束时间;如:每年的金额Amount=3000.00;开始时间StartDate='2008-08-01';结束时间EndDate=’2010-06-01‘;
需求结果:1、得到每年每月的金额,如:08年8月--08年12月(09年1月--09年12月)(10年1月--10年5月)每个月的金额(该金额(3000)分配是平均分配,如果出现余数则将余数加到该年的最后一个月上面)
2、得到该时间内的总金额(每年最后一个月的金额+每年前面月份的金额);
3、最后使用临时表展示数据结果
==========================================================*/
create proc [dbo].[sp_GetEventListAmount]
@Amount money,
@StartDate datetime,
@Enddate datetime
as
begin
CREATE TABLE #table(
[Year]
int,
AmountAll
money,
Amount1
money,
Amount2
money,
Amount3
money,
Amount4
money,
Amount5
money,
Amount6
money,
Amount7
money,
Amount8
money,
Amount9
money,
Amount10
money,
Amount11
money,
Amount12
money
);
declare @Year int
declare @StartMonth int
declare @EndMonth int
--获取两个时间之间的年度,并计算每月金额
set
@Year=DATENAME(year,@StartDate)
while @Year<=DATENAME(year,@Enddate)
begin
insert into #table (Year) values (@Year);
if @Year>DATENAME(year,@StartDate) AND @Year
begin
Update #table set Amount1=Convert(decimal(18,2),Convert(decimal(18,2),(@Amount/12))),Amount2=Convert(decimal(18,2),(@Amount/12)),Amount3=Convert(decimal(18,2),(@Amount/12)),
Amount4=Convert(decimal(18,2),(@Amount/12)),Amount5=Convert(decimal(18,2),(@Amount/12)),Amount6=Convert(decimal(18,2),(@Amount/12)),
Amount7=Convert(decimal(18,2),(@Amount/12)),Amount8=Convert(decimal(18,2),(@Amount/12)),Amount9=Convert(decimal(18,2),(@Amount/12)),
Amount10=Convert(decimal(18,2),(@Amount/12)),Amount11=Convert(decimal(18,2),(@Amount/12)) where Year = @Year
Update #table set Amount12=(@Amount-(Amount1+Amount2+Amount3+Amount4+Amount5+Amount6+Amount7+Amount8+Amount9+Amount10+Amount11)) where Year = @Year
Update #table set AmountAll=(Amount1+Amount2+Amount3+Amount4+Amount5+Amount6+Amount7+Amount8+Amount9+Amount10+Amount11+Amount12) where Year = @Year
end
set @Year=@Year+1;
end
declare @Name varchar(10)--列名
Declare @Str Varchar(500)--Update 语句
--当开始时间与结束时间不在同一年时,获取第一年的金额
if DATENAME(year,@StartDate) < DATENAME(year,@Enddate)
begin
set @StartMonth = DATENAME(month,@StartDate);
while @StartMonth<=12
begin
select @Name=name from tempdb.sys.columns where object_id = object_id('tempdb..#table') and SUBSTRING(name,7,2)=convert(varchar(5),@StartMonth);
Set @Str='Update #table set '+@Name+'=300 where [Year] ='+ ltrim(DATENAME(year,@StartDate))
Exec (@Str)
set @StartMonth = @StartMonth+1;
end
Update #table set Amount12 = (@Amount-(isnull(Amount1,0)+isnull(Amount2,0)+isnull(Amount3,0)+isnull(Amount4,0)+isnull(Amount5,0)+isnull(Amount6,0)+isnull(Amount7,0)+isnull(Amount8,0)+isnull(Amount9,0)+isnull(Amount10,0)+isnull(Amount11,0))) where Year = DATENAME(Year,@StartDate);
Update #table set AmountAll = (isnull(Amount1,0)+isnull(Amount2,0)+isnull(Amount3,0)+isnull(Amount4,0)+isnull(Amount5,0)+isnull(Amount6,0)+isnull(Amount7,0)+isnull(Amount8,0)+isnull(Amount9,0)+isnull(Amount10,0)+isnull(Amount11,0)+isnull(Amount12,0)) where Year = DATENAME(Year,@StartDate);
--当开始时间与结束时间不在同一年时,获取最后一年的金额
set @EndMonth = DATENAME(month,@Enddate);
while @EndMonth>=1
begin
select @Name=name from tempdb.sys.columns where object_id = object_id('tempdb..#table') and SUBSTRING(name,7,2)=convert(varchar(5),@EndMonth);
Set @Str='Update #table set '+@Name+'=300 where [Year] ='+ ltrim(DATENAME(year,@Enddate))
Exec (@Str)
set @EndMonth = @EndMonth-1;
end
set @EndMonth = DATENAME(month,@Enddate);
select @Name=name from tempdb.sys.columns where object_id = object_id('tempdb..#table') and SUBSTRING(name,7,2)=convert(varchar(5),@EndMonth);
set @str='Update #table set '+@Name+' = ('+cast(@Amount/@EndMonth as varchar(100))+'+('+cast(@Amount as varchar(100))+'-(isnull(Amount1,0)+isnull(Amount2,0)+isnull(Amount3,0)+isnull(Amount4,0)+isnull(Amount5,0)+isnull(Amount6,0)+isnull(Amount7,0)+isnull(Amount8,0)+isnull(Amount9,0)+isnull(Amount10,0)+isnull(Amount11,0)))) where Year ='+ltrim(DATENAME(Year,@Enddate));
Exec (@Str)
Update #table set AmountAll = (isnull(Amount1,0)+isnull(Amount2,0)+isnull(Amount3,0)+isnull(Amount4,0)+isnull(Amount5,0)+isnull(Amount6,0)+isnull(Amount7,0)+isnull(Amount8,0)+isnull(Amount9,0)+isnull(Amount10,0)+isnull(Amount11,0)+isnull(Amount12,0))
end
--当开始时间和结束时间在同一年时,获取该年度有效月份的金额
else if DATENAME(year,@StartDate) = DATENAME(year,@Enddate)
begin
set @StartMonth = DATENAME(month,@StartDate);
set @EndMonth = DATENAME(month,@Enddate);
while @StartMonth<=@EndMonth
begin
select @Name=name from tempdb.sys.columns where object_id = object_id('tempdb..#table') and SUBSTRING(name,7,2)=convert(varchar(5),@StartMonth);
Set @Str='Update #table set '+@Name+'=300 where [Year] ='+ ltrim(DATENAME(year,@StartDate))
Exec (@Str)
Update #table set AmountAll = (isnull(Amount1,0)+isnull(Amount2,0)+isnull(Amount3,0)+isnull(Amount4,0)+isnull(Amount5,0)+isnull(Amount6,0)+isnull(Amount7,0)+isnull(Amount8,0)+isnull(Amount9,0)+isnull(Amount10,0)+isnull(Amount11,0)+isnull(Amount12,0))
set @StartMonth = @StartMonth+1;
end
end
select * from #table
select sum(AmountAll) as Amount from #table
End
-- =========================================================
/*(55)======================================================
需求原因:
查询重复数据
==========================================================*/
select * from member where name in (select name from member group by name having count(1)>= 2)
-- =========================================================
/*(56)======================================================
需求原因:
一、现有一个表A,A01是唯一字段:
A01 (序号) A02(条码)
------------------------------------
1 null
2 null
3 null
...
二、现想给表A的A02产生如下格式的条码:B+YYMMDD+001 ,从001开始编号,产生条码后效果如下:
A01 (序号) A02(条码)
------------------------------------
1 B140425001
2 B140425002
3 B140425003
...
==========================================================*/
drop table 表A
create table 表A
(A01 int,A02 varchar(20))
insert into 表A
select 1,null union all
select 2,null union all
select 3,null
/*方法一:*/
-- 更新
update a
set a.A02=b.A02
from 表A a
inner join
(select A01,
'B'
+substring(convert(varchar,getdate(),112),3,6)
+right('000'+rtrim(row_number() over(order by A01)),3) 'A02'
from 表A) b on a.A01=b.A01
-- 结果
select * from 表A
/*
A01 A02
----------- --------------------
1 B140425001
2 B140425002
3 B140425003
(3 row(s) affected)
*/
/*方法二:*/
WITH TT
AS ( SELECT number
FROM master..spt_values
WHERE type = 'P'
AND number BETWEEN 1 AND 20
)
SELECT * ,
'B' + RIGHT(CONVERT(VARCHAR, GETDATE(), 112), 6) + RIGHT('000'
+ CONVERT(VARCHAR, number),
3) AS 条码
FROM TT
/*
number
条码
1
B140425001
2
B140425002
3
B140425003
4
B140425004
5
B140425005
6
B140425006
7
B140425007
8
B140425008
9
B140425009
10
B140425010
11
B140425011
12
B140425012
13
B140425013
14
B140425014
15
B140425015
16
B140425016
17
B140425017
18
B140425018
19
B140425019
20
B140425020*/
-- =========================================================
/*(57)======================================================
需求原因:
我有个字段是自动编号,编号唯一,组成方式是:ABCDE+年份+递增编号,
比如ABCDE20148888,但是每到新的一年,比如2015年,
递增编号又要从0001开始:ABCDE20150001,这样有什么方法可以实现呢
==========================================================*/
Drop table test
create table test(编号 nvarchar(20))
/*方法一:*/
DECLARE @Sequence varchar(4)
SET @Sequence = RIGHT(
(
SELECT MAX(编号)
FROM test
WHERE 编号 LIKE 'ABCDE'+CONVERT (varchar, DatePart(YEAR,GETDATE())) + '%'
),
4
)
IF @Sequence IS NOT NULL
BEGIN
insert test values('ABCDE'+CONVERT (varchar, DatePart(YEAR,GETDATE()))+ right(cast(power(10,4) as varchar)+convert(int,@Sequence)+1,4))
END
ELSE
BEGIN
insert test values('ABCDE'+CONVERT (varchar, DatePart(YEAR,GETDATE()))+'0001')
END
select * from test
/*
ABCDE20140001
ABCDE20140002
ABCDE20140003
*/
Drop table test
--建表
create table test(编号 nvarchar(20))
--创建函数 返回0001
/*方法二:*/
create function dbo.testcreateid()
returns varchar(15)
as
begin
declare @Sequence varchar(4)
set @Sequence = RIGHT(
(
select MAX(编号)
from test
where 编号 LIKE 'ABCDE'+CONVERT (varchar, DatePart(YEAR,GETDATE())) + '%'
),
4
)
if @Sequence IS NOT NULL
begin
set @Sequence=right(cast(power(10,4) as varchar)+convert(int,@Sequence)+1,4)
end
else
begin
set @Sequence='0001'
end
return @Sequence
end
--获取0001等
declare @num varchar(10);
set @num=dbo.testcreateid()
select @num
/*
0001
*/
-- =========================================================
/*(58)======================================================
需求原因:
如下
名字;产品
小李;A/AB/C/A
小张;B/C/A/D
。。。
想把产品拆开,并按从左到右的顺序编号。
即
名字;产品
小李;1_A
小李; 2_AB
小李; 3_C
小李; 4_A
。。。
==========================================================*/
--SQL SERVER 每个实例支持的数据库数为 32767 个
--> 测试数据:[tb]
if object_id('[tb]') is not null drop table [tb]
go
create table [tb]([名字] varchar(4),[产品] varchar(8))
insert [tb]
select '小李','A/AB/C/A' union all
select '小张','B/C/A/D'
--SELECT
-- *
--FROM [tb]
--------------开始查询--------------------------
/*方法一:*/
SELECT
名字,LTRIM(ROW_NUMBER()OVER(PARTITION BY 名字 ORDER BY GETDATE()))+'_'+产品 AS 产品
FROM
(
Select
a.名字,substring(a.产品,b.number,charindex('/',a.产品+'/',b.number)-b.number) AS 产品
from
Tb a join master..spt_values b
ON B.type='p' AND B.number BETWEEN 1 AND LEN(A.产品)
where
substring('/'+a.产品,b.number,1)='/')t
----------------结果----------------------------
/* 名字 产品
---- ---------------------------------
小李 1_A
小李 2_AB
小李 3_C
小李 4_A
小张 1_B
小张 2_C
小张 3_A
小张 4_D
(8 行受影响)
*/
/*方法二:*/
WITH a1 ([名字],[产品]) AS
(
select '小李','A/AB/C/A' union ALL
select '小张','B/C/A/D'
)
,a2 AS
(
SELECT *,ROW_NUMBER() OVER(ORDER BY @@servername) re FROM a1
)
SELECT [名字],RTRIM(ROW_NUMBER() OVER(PARTITION BY re ORDER BY @@servername))+'_'+b.[产品]
FROM
(SELECT [名字],re,[产品]=CONVERT(XML, ''+replace(RTRIM(LTRIM([产品])),'/','')+'') FROM a2) a
OUTER APPLY
(SELECT [产品] = C.v.value('.','NVARCHAR(MAX)') FROM a.[产品].nodes('/root/v') C(v)) b
-- =========================================================
/*(59)======================================================
需求原因:
逗号拆分多条数据
==========================================================*/
drop table test
go
create table test(area varchar(100), date datetime)
insert into test
select '黑龙江,吉林,辽宁', '2013-5-1' union all
select '内蒙古,北京', '2014-1-1' union all
select '福建,浙江', '2012-4-2' union all
select '天津,河北,河南,山东,威海,青岛,哈尔滨,武清区', '2015-3-16' union all
select '新疆', '2014-9-12' union all
select '辽宁,河南,威海,沈阳,大连', '2015-2-1'
go
select
SUBSTRING(t.area, number ,CHARINDEX(',',t.area+',',number)-number) area,
date
from test t,master..spt_values s
where s.number >=1
and s.type = 'P'
and SUBSTRING(','+t.area,s.number,1) = ','
/*
area
date
黑龙江
2013-05-01 00:00:00.000
吉林
2013-05-01 00:00:00.000
辽宁
2013-05-01 00:00:00.000
内蒙古
2014-01-01 00:00:00.000
北京
2014-01-01 00:00:00.000
福建
2012-04-02 00:00:00.000
浙江
2012-04-02 00:00:00.000
天津
2015-03-16 00:00:00.000
河北
2015-03-16 00:00:00.000
河南
2015-03-16 00:00:00.000
山东
2015-03-16 00:00:00.000
威海
2015-03-16 00:00:00.000
青岛
2015-03-16 00:00:00.000
哈尔滨
2015-03-16 00:00:00.000
武清区
2015-03-16 00:00:00.000
新疆
2014-09-12 00:00:00.000
辽宁
2015-02-01 00:00:00.000
河南
2015-02-01 00:00:00.000
威海
2015-02-01 00:00:00.000
沈阳
2015-02-01 00:00:00.000
大连
2015-02-01 00:00:00.000
*/
-- =========================================================
/*(60)======================================================
需求原因:
现有数据库tableA ,字段(id(int), idate (datetime), iweight(decimal))
数据如下:
1, 2013-01-01 ,100.5
2, 2013-01-11 ,110.5
3, 2013-02-01 ,120.5
4, 2013-02-01 ,130.5
5, 2013-03-01 ,1400.5
6, 2013-03-01 ,150.5
7, 2013-04-01 ,60.5
8, 2013-05-01 ,160.5
9, 2013-05-01 ,180.5
10, 2013-06-01 ,190.5
11, 2013-06-01 ,300.5
现需要根据月份进行分别汇总
如输入2~4月,则分别得到:
1 , 2月 ,500
1 , 3月 ,600
1 , 4月 ,880
=========================================================*/
--> 测试数据:[tableA]
if object_id('[tableA]') is not null drop table [tableA]
go
create table [tableA]([id] int,[idate] datetime,[iweight] numeric(5,1))
insert [tableA]
select 1,'2013-01-01',100.5 union all
select 2,'2013-01-11',110.5 union all
select 3,'2013-02-01',120.5 union all
select 4,'2013-02-01',130.5 union all
select 5,'2013-03-01',1400.5 union all
select 6,'2013-03-01',150.5 union all
select 7,'2013-04-01',60.5 union all
select 8,'2013-05-01',160.5 union all
select 9,'2013-05-01',180.5 union all
select 10,'2013-06-01',190.5 union all
select 11,'2013-06-01',300.5
--------------开始查询--------------------------
/*方法一:*/
select CONVERT(VARCHAR(2),DATEPART(MONTH,idate))+'月' '月份',SUM(iweight)iweight
from [tableA]
WHERE DATEPART(MONTH,idate) BETWEEN 2 AND 6
GROUP BY DATEPART(MONTH,idate)
----------------结果----------------------------
/*
月份 iweight
---- ---------------------------------------
2月 251.0
3月 1551.0
4月 60.5
*/
/*方法二:*/
declare @T table([id] int,[idate] Datetime,[iweight] decimal(18,1))
Insert @T
select 1,'2013-01-01',100.5 union all
select 2,'2013-01-11',110.5 union all
select 3,'2013-02-01',120.5 union all
select 4,'2013-02-01',130.5 union all
select 5,'2013-03-01',1400.5 union all
select 6,'2013-03-01',150.5 union all
select 7,'2013-04-01',60.5 union all
select 8,'2013-05-01',160.5 union all
select 9,'2013-05-01',180.5 union all
select 10,'2013-06-01',190.5 union all
select 11,'2013-06-01',300.5
declare @dt1 varchar(6),@dt2 varchar(6)
select @dt1='201302',@dt2='201304'
Select
YEAR([idate]) as 年,
MONTH([idate]) as 月,
SUM([iweight]) as [iweight]
from @T
where convert(varchar(6),[idate],112) between @dt1 and @dt2
group by YEAR([idate]),MONTH([idate])
/*
年
月
iweight
2013
2
251.0
2013
3
1551.0
2013
4
60.5
*/
/*方法三:*/
select datepart(year,ordertime) 年,datepart(month,ordertime) 月, sum(Realprice) as Realprice
from [order]
where ordertime >='2014-02-01' and ordertime<'2015-05-01'
group by datepart(year,ordertime) , datepart(month,ordertime)
/*
2014
8
8667.00
2014
9
107755.00
2014
10
26633.00
2014
11
137.00
*/
-- =========================================================
/*(61)======================================================
需求原因:
true查询方式
=========================================================*/
--true查询方式
select top 10 * from [order]
where convert(varchar(10),OrderTime,121)='2014-08-13'
--false查询方式
select top 10 * from [order]
where OrderTime='2014-08-13'
-- =========================================================
/*(62)======================================================
需求原因:
--判断纵向表中某个字段不存在
=========================================================*/
--> 测试数据:[huang]
if object_id('[huang]') is not null drop table [huang]
go
create table [huang]([ID] int,[FNname] varchar(10))
insert [huang]
select 1,'BookID' union all
select 2,'BookName' union all
select 3,'Auhor' union all
select 4,'BookID' union all
select 5,'BookName' union all
select 6,'Auhor' union all
select 7,'BookID' union all
select 8,'BookName' union all
select 9,'Auhor' union all
select 10,'BookID' union all
select 11,'BookName' union all
select 12,'Auhor' union all
select 13,'RelationID' union ALL
select 14,'BookID' union all
select 15,'BookName' union all
select 16,'Auhor' UNION ALL
SELECT 17,'RelationID'
select * from [huang]
--------------开始查询
;WITH cte AS (
select * ,ROW_NUMBER()OVER(ORDER BY id) idt
FROM huang a
WHERE [FNname]='BookID'),cte2 AS (
SELECT a.id,a.fnname,a.idt,CASE WHEN b.id-1 IS NULL THEN (SELECT MAX(id) FROM huang ) ELSE b.id-1 END AS endid
FROM cte a left JOIN cte b ON a.idt=b.idt-1)
SELECT *
FROM huang
WHERE EXISTS (SELECT 1 FROM (
SELECT MIN(id) bid ,MAX(endid)eid
FROM cte2 a
WHERE not EXISTS (SELECT 1 FROM (SELECT id FROM huang WHERE fnname='RelationID')b WHERE b.id BETWEEN a.id AND a.endid)) b WHERE id BETWEEN b.bid AND b.eid)
------------------结果----------------------------RelationID
/*
ID FNname
----------- ----------
1 BookID
2 BookName
3 Auhor
4 BookID
5 BookName
6 Auhor
7 BookID
8 BookName
9 Auhor
*/
-- =========================================================
/*(63)======================================================
需求原因:
数据库中使用正则表达式
数据库中有一个字段有Tb23456,TBS123456,tasd1234,DFS1243456这些类型,
过滤掉只要Tb23456这个类型的呢
=========================================================*/
--> 测试数据:[huang]
if object_id('[huang]') is not null drop table [huang]
go
create table [huang]([a] varchar(10))
insert [huang]
select 'Tb23456' union all
select 'TBS123456' union ALL
select 'tasd1234' union all
select 'DFS1243456'
--------------开始查询--------------------------
select * from [huang] WHERE a LIKE 'tb[0-9]%'
----------------结果----------------------------
/*
a
----------
Tb23456
*/
-- =========================================================
/*(64)======================================================
需求原因:
如例:
ID Address
1 0.1四川
2 0.2四川xxxxx
3 0.3四川yyyyyyyy
4 0.4四川xxxxxxxxxx
我需要的结果如下
ID Address
1 四川
2 四川xxxxx
3 四川yyyyyyyy
4 四川xxxxxxxxxx
=========================================================*/
--> 测试数据:[huang]
if object_id('[huang]') is not null drop table [huang]
go
create table [huang]([a] varchar(10))
insert [huang]
select 'Tb23456' union all
select 'TBS123456' union ALL
select 'tasd1234' union all
select 'DFS1243456'
--------------开始查询--------------------------
drop table #t
select 1 ID, N'0.1四川' Address
into #t
union all select 2, N'0.2四川xxxxx'
union all select 3, N'0.3四川yyyyyyyy'
union all select 4, N'0.4四川xxxxxxxxxx'
select * from #t
select id,SUBSTRING(Address, PATINDEX('%[^0-9.]%',Address),LEN(Address)- PATINDEX('%[^0-9.]%',Address)+1) Address
from #t;
-- =========================================================
/*(65)======================================================
需求原因:
数据库中读取某一张表(数据若干),然后将某一字段进行截取
比如
字段A 字段B
a/a/c x
a/b/c x
切出来就变成
字段1 字段2 字段3 字段B
a a c x
b b c x
数据不止一条 ,是遍历切取,求完整sql(从读取到遍历到截取到输出)
=========================================================*/
--------------开始查询--------------------------
if object_id('[tb]') is not null drop table [tb]
go
create table [tb](A varchar(40),B varchar(10))
insert [tb]
select 'a/a/c','x' union all
select 'a/b/c','x'
go
/*方法一:*/
if OBJECT_ID('tempdb..#temp1') is not null
drop table #temp1
if OBJECT_ID('tempdb..#temp2') is not null
drop table #temp2
select *,IDENTITY(int,1,1) id into #temp1
from tb
declare @sql nvarchar(4000)
set @sql = '';
;with t
as
(
select ID,
SUBSTRING(t.A, number ,CHARINDEX('/',t.a+'/',number)-number) as v,
b,
row_number() over(partition by id order by @@servername) as rownum
from #temp1 t,master..spt_values s
where s.number >=1
and s.type = 'P'
and SUBSTRING('/'+t.A,s.number,1) = '/'
)
select * into #temp2
from t
select @sql = @sql + ',max(case when rownum = '+CAST(rownum as varchar)+
' then v else null end) as 列'+CAST(rownum as varchar)
from #temp2
group by rownum
set @sql = 'select '+STUFF(@sql,1,1,'')+ ',b' +
' from #temp2 group by id,b'
--select @sql
exec(@sql)
/*
列1
列2
列3
b
a
a
c
x
a
b
c
x
*/
/*方法二:*/
create table #temp(colA varchar(10),colB varchar(5))
GO
insert into #temp
select 'a/a/c','x' union all
select 'a/b/c','x' union all
select 'b/b/c','y' union all
select 'b/c/d','x' union all
select 'b/c/e','z' union all
select 'xy/pp/qq','zx' union all
select 'ee/cc/dd','zc' union all
select 'ii/jj/kk','zc'
GO
select
left(colA,charindex('/',colA)-1) 字段1,
substring(colA,charindex('/',colA)+1,charindex('/',colA,charindex('/',colA)+1) - charindex('/',colA) - 1) 字段2,
right(colA,len(colA) - charindex('/',colA,charindex('/',colA)+1)) 字段3,
colB 字段B
from #temp
/*
字段1 字段2 字段3 字段B
---------- ---------- ---------- -----
a a c x
a b c x
b b c y
b c d x
b c e z
xy pp qq zx
ee cc dd zc
ii jj kk zc
(8 行受影响)
/
复杂点
*/
if object_id('[tb]') is not null drop table [tb]
go
create table [tb](A varchar(40),B varchar(10))
insert [tb]
select 'xx/xx/xx/xx/xx/xx','x' union all
select 'yy/yy/yy/yy/yy/yy','x'
go
if OBJECT_ID('tempdb..#temp1') is not null
drop table #temp1
if OBJECT_ID('tempdb..#temp2') is not null
drop table #temp2
select *,IDENTITY(int,1,1) id into #temp1
from tb
declare @sql nvarchar(3000)
declare @orderby nvarchar(100)
set @sql = '';
set @orderby = '';
;with t
as
(
select ID,
SUBSTRING(t.A, number ,CHARINDEX('/',t.a+'/',number)-number) as v,
b,
row_number() over(partition by id order by @@servername) as rownum
from #temp1 t,master..spt_values s
where s.number >=1
and s.type = 'P'
and SUBSTRING('/'+t.A,s.number,1) = '/'
)
select * into #temp2
from t
select @sql = @sql + ',max(case when rownum = '+CAST(rownum as varchar)+
' then v else null end) as 列'+CAST(rownum as varchar) ,
@orderby = @orderby + ',列'+CAST(rownum as varchar)
from #temp2
group by rownum
order by rownum --加了排序
set @sql = 'select '+STUFF(@sql,1,1,'')+ ',b' +
' from #temp2 group by id,b order by '+
stuff(@orderby,1,1,'')
--select @sql
exec(@sql)
/*
列1
列2
列3
列4
列5
列6
b
xx
xx
xx
xx
xx
xx
x
yy
yy
yy
yy
yy
yy
x
*/
-- =========================================================
/*(66)======================================================
需求原因:
高难度截取字符串
=========================================================*/
declare @a nvarchar(50)
set @a='某某厂-某某车间-某某班'
select left(@a,len(@a)-charindex('-',REVERSE(@a)))
-- =========================================================
/*(67)======================================================
需求原因:
SQL语句将表中的数据导出为xml文件
=========================================================*/
DROP TABLE test_blan
CREATE TABLE test_blan(x VARCHAR(100),y VARCHAR(100))
GO
INSERT INTO test_blan
SELECT 'a','a' UNION ALL
SELECT 's','s' UNION ALL
SELECT 'd','d' UNION ALL
SELECT 'f','f' UNION ALL
SELECT 'g','g' UNION ALL
SELECT 'q','q' UNION ALL
SELECT 'w','w' UNION ALL
SELECT 'e','e' UNION ALL
SELECT 'r','r' UNION ALL
SELECT 't','t' UNION ALL
SELECT 'y','y'
CREATE VIEW test_log AS SELECT 'root' l
CREATE TABLE TT(aa XML )
DECLARE @x XML
SET @x = (SELECT * FROM test_log IRoot,test_blan IData FOR XML AUTO)
INSERT TT VALUES (@x)
EXEC [master].sys.xp_cmdshell 'bcp mallshop.dbo.TT out E:/123.xml -c -T -k'
-- =========================================================
/*(68)======================================================
需求原因:
由于项目需要,需要获取一组数据的的最新一条数据,表结构如下:
[sql] view plaincopy
CREATE TABLE [dbo].[WUSU_SUOLITest_Table](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[ReceiveTime] [datetime] NULL,
[GroupID] [bigint] NOT NULL,
[DataValue] [float] NULL,
[SensorCode] [char](10) NOT NULL,
)
在这个表上只有两种操作,插入和查询,没有删除和更新。
而且同一种设备,随着id列的变大,ReceiveTime也随着变大。
每一个不同的SensorCode代表了一个设备,目前有50个设备,
每30秒上报一次数据,ReceiveTime代表上报数据的时间,
现在需要获取每一个设备最新一次的数据,
开始我使用如下的查询语句:
[sql] view plaincopy
select * from WUSU_SUOLITest_Table where id in (select max(id) from WUSU_SUOLITest_Table group by SensorCode )
在数据量比较小时,是没有问题的,但数据量特别大时,这种方式,
目前一天的数据就超过了14万,有很大的延时,即使在id上有聚集索引,SensorCode上使用了分区,
依然没有多大作用。时间主要花费到了group by上。
实在想不多到什么好的而解决方法,就只能在此表上创建一个触发器,
每次插入数据时就把最新的数据放在了一个临时表,
又有临时表最多只有50条数据,速度当然就很好了。
[sql] view plaincopy
create TRIGGER [dbo].[UpdateWUSU_LastOriginalDataSUOLI]
ON [dbo].[WUSU_SUOLITest_Table]
AFTER INSERT
AS
BEGIN
declare @SensorCode char(10), @DataValue float ,@ReceiveTime datetime ,@GroupID bigint
select @SensorCode=SensorCode,@DataValue=DataValue,@ReceiveTime=ReceiveTime,@GroupID=GroupID from inserted
update WUSU_LastOriginalData set DataValue=@DataValue,ReceiveTime=@ReceiveTime,GroupID=@GroupID
where SensorCode=@SensorCode
END
当然这是为了获取各种设备最新的一条数据,如果要获取最新的两条数据,
最多也就是100条记录,一次类推,只需要把上边的触发器修改一下就可以。
但还有没有更好的方式,在不修改表结构的情况下?目前还没有想到
=========================================================*/
--构建测试数据 生成5000W条数据, 分成50组
if OBJECT_ID('TestTb') is not null drop table TestTb
create table TestTb(
ID [bigint] identity,
[ReceiveTime] [datetime] NULL,
[GroupID] [bigint] NOT NULL,
[DataValue] [float] NULL, SensorCode smallint,)
INSERT INTO dbo.TestTb SELECT dateadd(ss,1+abs(checksum(newid()))%(1000000), '2012-09-04'),
1+abs(checksum(newid()))%(10),rand(checksum(newid()))*(100), 1+abs(checksum(newid()))%(50)
select * from TestTb
DECLARE @i AS INT, @rc AS INT,@max int;
SET @rc = 1;
SET @max = 50000000;
set @i = ceiling(log10(@max)/LOG10(2))-1;
WHILE @rc <= @i
BEGIN
INSERT INTO dbo.TestTb SELECT dateadd(ss,1+abs(checksum(newid()))%(1000000), '2012-09-04'),
1+abs(checksum(newid()))%(10),rand(checksum(newid()))*(100), 1+abs(checksum(newid()))%(50)
FROM dbo.TestTb;
SET @rc = @rc +1 ;
END
select @max = @max - @@IDENTITY
INSERT INTO dbo.TestTb
SELECT top(@max) dateadd(ss,1+abs(checksum(newid()))%(1000000), '2012-09-04'), 1+abs(checksum(newid()))%(10)
,rand(checksum(newid()))*(100), 1+abs(checksum(newid()))%(50) FROM dbo.TestTb
--创建索引
create index xxx on dbo.TestTb(SensorCode,ID)
--生成该示例数据大概需要十几分钟
GO
--查看表信息
EXEC sp_spaceused TestTb, true
/*
name rows reserved data index_size unused
----- ------------- ----------- ------------------ ------------------ ------------------ ------------------
TestTb 50000000 3319576 KB 2127664 KB 1191440 KB 472 KB
*/
--打开时间统计
set statistics time on
--方案一测试
select * from TestTb where id in(select MAX(ID) from TestTb group by SensorCode )
/*SQL Server 分析和编译时间:
CPU 时间 = 563 毫秒,占用时间 = 7390 毫秒。
ID ReceiveTime GroupID DataValue SensorCode
-------------------- ----------------------- -------------------- ---------------------- ----------
49999819 2012-09-09 17:20:41.000 6 86.5541594411481 42
49999854 2012-09-12 11:32:37.000 10 48.1770800985096 26
49999893 2012-09-05 06:54:51.000 3 93.4088283532638 3
。
。
。
49999998 2012-09-04 14:20:03.000 9 31.5613982953944 4
49999999 2012-09-08 21:59:21.000 4 40.7771765192966 33
50000000 2012-09-15 10:37:59.000 4 46.3749805998307 5
(50 行受影响)
SQL Server 执行时间:
CPU 时间 = 13483 毫秒,占用时间 = 68843 毫秒。
*/
--清空缓存
DBCC DROPCLEANBUFFERS;
GO
DBCC FREEPROCCACHE;
GO
DBCC FLUSHPROCINDB(8);
GO
--方案二测试,为引出方案三做准备的
declare @i int,@sql varchar(max)
set @i = 1
set @sql = '
select '+CAST(@i as varchar(2))+',MAX(ID) from TestTb where SensorCode = '+CAST(@i as varchar(2))
while @i < 50
begin
set @i = @i + 1
set @sql = @sql + '
union select '+CAST(@i as varchar(2))+',MAX(ID) from TestTb where SensorCode = '+CAST(@i as varchar(2))
end
--print @sql
exec(@sql)
/*
----------- -----------
1 49999999
2 49999956
3 49999991
。
。
。
46 49999998
47 49999844
48 49999989
49 49999996
50 49999995
(50 行受影响)
SQL Server 执行时间:
CPU 时间 = 16 毫秒,占用时间 = 638 毫秒。
SQL Server 执行时间:
CPU 时间 = 78 毫秒,占用时间 = 712 毫秒。
*/
--清空缓存
DBCC DROPCLEANBUFFERS;
GO
DBCC FREEPROCCACHE;
GO
DBCC FLUSHPROCINDB(8);
GO
--方案三、使用cross apply,我认为cross apply就是为这种应用而存在的
--建一个1-50的表Equip,代表50个设备
CREATE TABLE dbo.Equip(n INT NOT NULL PRIMARY KEY);
DECLARE @max AS INT, @rc AS INT;SET @max = 50;
SET @rc = 1;
INSERT INTO Equip VALUES(1);
WHILE @rc * 2 <= @max
BEGIN
INSERT INTO dbo.Equip SELECT n + @rc FROM dbo.Equip;
SET @rc = @rc * 2;
END
INSERT INTO dbo.Equip
SELECT n + @rc FROM dbo.Equip WHERE n + @rc <= @max;
GO
--应用aross apply
SELECT a.*
FROM dbo.Equip AS E
CROSS APPLY
(SELECT TOP(1) *
FROM dbo.TestTb AS O
WHERE O.SensorCode = E.n
ORDER BY id DESC) AS A ORDER BY a.SensorCode
GO
/*
ID ReceiveTime GroupID DataValue SensorCode
-------------------- ----------------------- -------------------- ---------------------- ----------
49999924 2012-09-14 22:14:13.000 2 98.4266307489846 1
49999950 2012-09-14 18:42:43.000 9 97.8412880687587 2
49999893 2012-09-05 06:54:51.000 3 93.4088283532638 3
。
。
。
49999993 2012-09-08 23:46:28.000 6 13.0556314551186 48
49999980 2012-09-07 15:02:38.000 7 38.7540906986139 49
49999958 2012-09-15 13:36:01.000 7 27.2834417396104 50
(50 行受影响)
SQL Server 执行时间:
CPU 时间 = 0 毫秒,占用时间 = 734 毫秒。
--耗时 0.5秒
*/
--综上 5000万条数据,建立非聚集索引,方案一耗时 68秒,方案三耗时 0.7秒
--关闭时间统计
set statistics time off
-- =========================================================
/*(69)======================================================
需求原因:
一个字段中由字母,数字,中文组成。
例如:
A325632 剩余是中文
A36522剩余是中文
前面的A是固定的。我要提取中中间的数字部分
=========================================================*/
declare @str varchar(30)
set @str='A325632 剩余是中文'
/*select patindex('%[^r]%','rrrdsdddrdaadadffdr')
返回4,除[]中的字符串的匹配字符,第一次出现d不在[^r]里,所以就找到第一次这位*/
select PATINDEX('%[^A0-9]%',@str)
/*LEFT (, )
返回character_expression 左起 integer_expression 个字符。
select left('shs123',2)
*/
select left(@str,PATINDEX('%[^A0-9]%',@str))
/*用第三个表达式替换第一个字符串表达式中出现的所有第二个给定字符串表达式。
语法
REPLACE ( ''string_replace1'' , ''string_replace2'' , ''string_replace3'' )
*/
select replace(left(@str,PATINDEX('%[^A0-9]%',@str)),'A','')
/*
-------
325632
*/
-- =========================================================
/*(70)======================================================
需求原因:
原表:
A B C
-------------
1 2 -4
2 4 2
2 1 6
3 5 -5
想让LEFT(C,1)='-' 的A 和B 字段互换 C的负值变为正数
目标表:
A B C
-------------
2 1 4
2 4 2
2 1 6
5 3 5
=========================================================*/
declare @t table (A int,B int,C int)
insert into @t
select 1,2,-4 union all
select 2,4,2 union all
select 2,1,6 union all
select 3,5,-5
update @T SET A=B,B=A,C=abs(C) where sign(C)=-1
select * from @t
/*
A B C
----------- ----------- -----------
2 1 4
2 4 2
2 1 6
5 3 5
*/
-- =========================================================
/*(71)======================================================
需求原因:
1.计算一个月第一天的SQL 脚本
2.本周的星期一
3.一年的第一天
4.季度的第一天
5.当天的半夜
6.上个月的最后一天
7.去年的最后一天
8.本月的最后一天
9.本年的最后一天
10.本月的第一个星期一
=========================================================*/
Select DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)
Select DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)
Select DATEADD(yy, DATEDIFF(yy,0,getdate()), 0)
Select DATEADD(qq, DATEDIFF(qq,0,getdate()), 0)
Select DATEADD(dd, DATEDIFF(dd,0,getdate()), 0)
Select DATEADD(ms,-3,DATEADD(mm, DATEDIFF(mm,0,getdate()), 0))
Select DATEADD(ms,-3,DATEADD(yy, DATEDIFF(yy,0,getdate()), 0))
Select DATEADD(ms,-3,DATEADD(mm, DATEDIFF(m,0,getdate())+1, 0))
Select DATEADD(ms,-3,DATEADD(yy, DATEDIFF(yy,0,getdate())+1, 0))
select DATEADD(wk, DATEDIFF(wk,0,DATEADD(dd,6-datepart(day,getdate()),getdate())), 0)
/*
DATEDIFF函数计算两个日期之间的小时、天、周、月、年等时间间隔总数
DATEADD函数计算一个日期通过给时间间隔加减来获得一个新的日期
*/
/*
DATEDIFF(mm,0,getdate())是计算当前日期和"1900-01-01 00:00:00.000"这个日期之间的月数
记住:时期 和时间变量和毫秒一样是从"1900-01-01 00:00:00.000"开始计算的。
这就是为什么你可以在DATEDIFF 函数中指定第一个时间表达式为"0"。
*/
-- =========================================================
/*(72)======================================================
需求原因:
输出下一个月日期
=========================================================*/
select dateadd(dd,number,convert(varchar(8),dateadd(month,1,getdate()),120)+'01') as 日期
from master..spt_values
--master..spt_values相当于一个数字辅助表
--select number from master..spt_values where type='p'
--在sql中主要用到number这个字段。
--spt_values 是一张常量表
where type='p'
and dateadd(dd,number,convert(varchar(8),dateadd(month,1,getdate()),120)+'01')<
convert(varchar(8),dateadd(month,2,getdate()),120)+'01'
--select dateadd(dd,number,convert(varchar(8),dateadd(month,1,'20150312'),120)+'01') as 日期
--from master..spt_values
--where type='p'
--and dateadd(dd,number,convert(varchar(8),dateadd(month,1,'20150312'),120)+'01')<
--convert(varchar(8),dateadd(month,2,getdate()),120)+'01'
/*
日期
-----------------------
2011-07-01 00:00:00.000
2011-07-02 00:00:00.000
2011-07-03 00:00:00.000
2011-07-04 00:00:00.000
2011-07-05 00:00:00.000
2011-07-06 00:00:00.000
2011-07-07 00:00:00.000
2011-07-08 00:00:00.000
2011-07-09 00:00:00.000
2011-07-10 00:00:00.000
2011-07-11 00:00:00.000
2011-07-12 00:00:00.000
2011-07-13 00:00:00.000
2011-07-14 00:00:00.000
2011-07-15 00:00:00.000
2011-07-16 00:00:00.000
2011-07-17 00:00:00.000
2011-07-18 00:00:00.000
2011-07-19 00:00:00.000
2011-07-20 00:00:00.000
2011-07-21 00:00:00.000
2011-07-22 00:00:00.000
2011-07-23 00:00:00.000
2011-07-24 00:00:00.000
2011-07-25 00:00:00.000
2011-07-26 00:00:00.000
2011-07-27 00:00:00.000
2011-07-28 00:00:00.000
2011-07-29 00:00:00.000
2011-07-30 00:00:00.000
2011-07-31 00:00:00.000
(31 行受影响)
*/
-- =========================================================
--以上总结时间:2015-06-09 21:58:28 晚上时间 (68)(69)(70)(71)
/*(73)======================================================
需求原因:
一张工资表,共两个字段,员工编号和月工资字段。
现由于物价上涨,公司为了提高员工薪水,
将按如下规则对员工工资进行调整:
月工资少于2000元的员工涨20%;
在2001元至3000元之间的员工涨15%;
在3001元至6000元的员工涨10%;
6000元以上的员工上涨工资5%.
要求:用存储过程完成本次工资调整,
并计算出通过此次工资上调会给公司每月增加多少成本
=========================================================*/
Drop Table Pay
DECLARE @i INT;
DECLARE @j INT;
DECLARE @jj INT;
DECLARE @qnum INT; --生成随机数的数量
Set @i=1;
Set @qnum =301;
SET NOCOUNT ON
Create Table Pay(
EmployID Varchar(20) Primary Key,
Qty
Decimal(10,2)
)
WHILE(@i<@qnum)
BEGIN
SELECT @j = cast( floor(rand()*(99999999-10000000)+10000000) as int)
SELECT @jj = cast( floor(rand()*(9999-1000)+1000) as int)
IF(NOT EXISTS(SELECT EmployID FROM Pay WHERE EmployID=@j ))
BEGIN
INSERT Pay (EmployID,Qty) VALUES (@j,@jj)
SET @i=@i+1;
END
END
SELECT * FROM Pay
create Procedure Up_PayChg
As
Begin
Declare @OldCost Decimal(16,2), @NowCost Decimal(16,2)
Select @OldCost = 0, @NowCost = 0
Create Table #Temp(
EmployID Varchar(20) Primary Key,
Qty
Decimal(10,2)
)
Insert Into #Temp
Select EmployID,
newQty = Case When Qty <= 2000 Then Qty*1.20
When (Qty > 2000 And Qty <= 3000) Then Qty*1.15
When (Qty > 3000 And Qty <= 6000) Then Qty*1.10
When Qty > 6000 Then Qty*1.05
End
From Pay
Select @OldCost = Sum(Isnull(Qty,0)) From Pay
Select @NowCost = Sum(Isnull(Qty,0)) From #Temp
Set @NowCost = @NowCost - @OldCost
Select AddCost = @NowCost
Select * From #Temp
End
-- =========================================================
/*(74)======================================================
需求原因:
/*数据如下:
源表[T]
col1
col2
ID
col3
col4
a
A
1
400-1
BH
b
NULL
2
400-2
NULL
c
B
3
400-3
BF
d
NULL
4
400-1
NULL
e
B
5
400-2
BH
f
B
6
400-3
NULL
g
CN
7
400-1
NULL
g
EN
8
400-1
NULL
f
NULL
9
400-3
NULL
x
CN
10
400-1
NULL
s
EN
11
400-1
NULL
h
NULL
12
400-3
NULL
b
CN
13
400-5
NULL
f
EN
14
400-6
NULL
x
CN
15
400-1
NULL
s
EN
16
400-1
NULL
b
NULL
17
400-3
NULL
v
A
18
400-3
BF
在这张表中找出列col4中为BH的行,接着在找出的记录中分两种情况进行进一步的查找。
注意:ID列是已经按从小到大排序,且是唯一的
--第一种情况是col4列的值是BH且col2列的值是A如下
col1
col2
ID
col3
col4
a
A
1
400-1
BH
--第一种情况查找过程:根据上一记录中col3列的值400-1在往后列col3所有都为400-1的记录,筛选出col2列中最先出现CN或EN的记录。
d
NULL
4
400-1
NULL
g
CN
7
400-1
NULL
g
EN
8
400-1
NULL
x
CN
10
400-1
NULL
s
EN
11
400-1
NULL
x
CN
15
400-1
NULL
s
EN
16
400-1
NULL
--第一种情况的最终结果
col1
col2
ID
col3
col4
a
A
1
400-1
BH
g
CN
7
400-1
NULL
--第二种情况稍微有些不同,col4列的值是BH且col2的值是B,如下:
col1
col2
ID
col3
col4
e
B
5
400-2
BH
--第二种情况查找过程:这里查找的是与400-2相同的记录,而是比400-2要大的所有记录并从中筛选出col2列中最先出现CN或EN的记录。
f
B
6
400-3
NULL
f
NULL
9
400-3
NULL
b
CN
13
400-5
NULL
f
EN
14
400-6
NULL
b
NULL
17
400-3
NULL
v
A
18
400-3
BF
--第二种情况的最终结果
col1
col2
ID
col3
col4
e
B
5
400-2
BH
b
CN
13
400-5
NULL
--最后的结果就是两种情况的结果联合起来
col1
col2
ID
col3
col4
a
A
1
400-1
BH
g
CN
7
400-1
NULL
e
B
5
400-2
BH
b
CN
13
400-5
NULL*/
=========================================================*/
drop table T
create table ss
(col1 varchar(1),
col2 varchar(2),
ID int,
col3 varchar(10),
col4 varchar(2))
insert into ss
select 'a','A','1','400-1','BH' union all
select 'b',NULL,'2','400-2',NULL union all
select 'c','B','3','400-3','BF' union all
select 'd',NULL,'4','400-1',NULL union all
select 'e','B','5','400-2','BH' union all
select 'f','B','6','400-3',NULL union all
select 'g','CN','7','400-1',NULL union all
select 'g','EN','8','400-1',NULL union all
select 'f',NULL,'9','400-3',NULL union all
select 'x','CN','10','400-1',NULL union all
select 's','EN','11','400-1',NULL union all
select 'h',NULL,'12','400-3',NULL union all
select 'b','CN','13','400-5',NULL union all
select 'f','EN','14','400-6',NULL union all
select 'x','CN','15','400-1',NULL union all
select 's','EN','16','400-1',NULL union all
select 'b',NULL,'17','400-3',NULL union all
select 'v','A','18','400-3','BF'
;WITH T AS
(
SELECT ROW_NUMBER() OVER(ORDER BY GETDATE()) AS Rid,* FROM dbo.ss WHERE col4='BH' and col2='A'
),TS AS(
SELECT (Rid*2-1)AS 'Aid',a.*,'start' AS [single],Rid*2 AS 'Cid',c.col1 AS c1, c.col2 AS c2, c.ID AS i2, c.col3 AS c3, c.col4 AS c4,[singlec] FROM T a
OUTER APPLY(
SELECT TOP 1 *,'end' AS [singlec]FROM dbo.ss b WHERE b.col3 = a.col3 AND b.ID>a.ID AND b.col2 in ('CN','EN')
) c
)
SELECT aid,col1,col2,id,col3,col4,[single] FROM TS --WHERE Aid % 2 <> 0
UNION ALL
SELECT cid ,c1,c2,i2,c3,c4,[singlec] FROM TS --WHERE c1 IS NOT NULL
ORDER BY 1 --ORDER BY 1 表示 所select 的字段按第一个字段排序
--1
a
A
1
400-1
BH
start
--2
g
CN
7
400-1
NULL
end
-- =========================================================
/*(75)======================================================
需求原因:
多表关联数据相加再汇总
=========================================================*/
--> 测试数据:[MOCTF]
if object_id('[MOCTF]') is not null drop table [MOCTF]
go
create table [MOCTF]([TF001] varchar(3),[TF002] varchar(3),[TF003] VARCHAR(10),[TF006] varchar(1))
insert [MOCTF]
select 'A01','001','20140717','Y' union all
select 'A01','005','20140727','Y' union all
select 'A01','008','20140620','Y'
--> 测试数据:[MOCTG]
if object_id('[MOCTG]') is not null drop table [MOCTG]
go
create table [MOCTG]([TG001] varchar(3),[TG002] varchar(3),[TG004] varchar(3),[TG005] varchar(4),[TG011] int)
insert [MOCTG]
select 'A01','001','Y01','天天',550 union all
select 'A01','001','Y02','向上',1001 union all
select 'A01','005','Y01','天天',300 union all
select 'A01','005','Y03','快乐',400 union all
select 'A01','008','Y01','天天',350
--> 测试数据:[PURTG]
if object_id('[PURTG]') is not null drop table [PURTG]
go
create table [PURTG]([TG001] varchar(3),[TG002] varchar(3),[TG003] VARCHAR(10),[TG013] varchar(1))
insert [PURTG]
select 'B01','001','20140710','Y' union all
select 'B01','003','20140719','Y' union all
select 'B01','005','20140611','Y'
--> 测试数据:[PURTH]
if object_id('[PURTH]') is not null drop table [PURTH]
go
create table [PURTH]([TH001] varchar(3),[TH002] varchar(3),[TH004] varchar(3),[TH005] varchar(4),[TH015] int)
insert [PURTH]
select 'B01','001','Y01','天天',660 union all
select 'B01','001','Y02','向上',330 union all
select 'B01','003','Y02','向上',440 union all
select 'B01','005','Y01','天天',500
--> 测试数据:[COPTG]
if object_id('[COPTG]') is not null drop table [COPTG]
go
create table [COPTG]([TG001] varchar(3),[TG002] varchar(3),[TG003] VARCHAR(10),[TG023] varchar(1))
insert [COPTG]
select 'B01','001','20140710','Y' union all
select 'B01','003','20140719','Y' union all
select 'B01','005','20140611','Y'
--> 测试数据:[COPTH]
if object_id('[COPTH]') is not null drop table [COPTH]
go
create table [COPTH]([TH001] varchar(3),[TH002] varchar(3),[TH004] varchar(3),[TH005] varchar(4),[TH008] int)
insert [COPTH]
select 'B01','001','Y01','天天',650 union all
select 'B01','001','Y02','向上',300 union all
select 'B01','003','Y02','向上',440 union all
select 'B01','005','Y01','天天',400
select * from [MOCTF]
select * from [MOCTG]
select * from [COPTH]
select * from [COPTG]
select * from [PURTH]
select * from [PURTG]
SELECT COALESCE(a.a,b.a,c.a)Y1,TG004,TG005,MAX(ISNULL(B,0))B,MAX(ISNULL(C,0))C,MAX(ISNULL(D,0))D,MAX(ISNULL(B,0))+MAX(ISNULL(C,0))+MAX(ISNULL(D,0)) E
FROM ( SELECT SUBSTRING(TF003, 1, 6) A ,
TG004 ,
TG005 ,
SUM(TG011) B
FROM MOCTG
LEFT JOIN MOCTF ON TG001 = TF001
AND TG002 = TF002
WHERE TF006 = 'Y'
GROUP BY SUBSTRING(TF003, 1, 6) ,
TG004,TG005
) [A]
FULL JOIN ( SELECT SUBSTRING(TG003, 1, 6) A ,
TH004 ,
TH005 ,
SUM(TH015) C
FROM PURTG
LEFT JOIN PURTH ON TG001 = TH001
AND TG002 = TH002
WHERE TG013 = 'Y'
GROUP BY SUBSTRING(TG003, 1, 6) ,
TH004,TH005
) [B] ON A.A = B.A
AND B.TH004 = A.TG004
FULL JOIN (SELECT SUBSTRING(TG003,1,6)A,TH004,SUM(TH008)D
FROM COPTG LEFT JOIN COPTH ON TG001=TH001 AND TG002=TH002
WHERE TG023='Y'
GROUP BY SUBSTRING(TG003,1,6),TH004) c ON c.A = b.A
GROUP BY COALESCE(a.a,b.a,c.a),TG004,TG005
ORDER BY COALESCE(a.a,b.a,c.a),TG004,TG005
/*
Y1 TG004 TG005 B C D E
---------- ----- ----- ----------- ----------- ----------- -----------
201406 Y01 天天 350 500 400 1250
201407 Y01 天天 850 660 740 2250
201407 Y02 向上 1001 770 740 2511
201407 Y03 快乐 400 0 0 400
*/
-- =========================================================
/*(76)======================================================
需求原因:
--BOM按节点排序应用实例
=========================================================*/
--实例1:
--> 生成测试数据表:Test1
IF NOT OBJECT_ID('[Test1]') IS NULL
DROP TABLE [Test1]
GO
CREATE TABLE [Test1]([id] INT,[code] NVARCHAR(10),[pid] INT,[name] NVARCHAR(10))
INSERT [Test1]
SELECT 1,'01',0,N'服装' UNION ALL
SELECT 2,'01',1,N'男装' UNION ALL
SELECT 3,'01',2,N'西装' UNION ALL
SELECT 4,'01',3,N'全毛' UNION ALL
SELECT 5,'02',3,N'化纤' UNION ALL
SELECT 6,'02',2,N'休闲装' UNION ALL
SELECT 7,'02',1,N'女装' UNION ALL
SELECT 8,'01',7,N'套装' UNION ALL
SELECT 9,'02',7,N'职业装' UNION ALL
SELECT 10,'03',7,N'休闲装' UNION ALL
SELECT 11,'04',7,N'西装' UNION ALL
SELECT 12,'01',11,N'全毛' UNION ALL
SELECT 13,'02',11,N'化纤' UNION ALL
SELECT 14,'05',7,N'休闲装'
GO
SELECT * FROM [Test1]
-->SQL查询如下:
;WITH T AS
(
SELECT CAST(CODE AS VARCHAR(20)) AS CODE,*,
CAST(ID AS VARBINARY(MAX)) AS px
FROM Test1 AS A
WHERE NOT EXISTS(SELECT * FROM Test1 WHERE id=A.pid)
UNION ALL
SELECT CAST(B.CODE+A.CODE AS VARCHAR(20)),A.*,
CAST(B.px+CAST(A.ID AS VARBINARY) AS VARBINARY(MAX))
FROM Test1 AS A
JOIN T AS B
ON A.pid=B.id
)
--SELECT Code,Name FROM T
SELECT * FROM T
ORDER BY px
/*
Code Name
-------------------- ----------
01 服装
0101 男装
010101 西装
01010101 全毛
01010102 化纤
010102 休闲装
0102 女装
010201 套装
010202 职业装
010203 休闲装
010204 西装
01020401 全毛
01020402 化纤
010205 休闲装
(14 行受影响)
*/
--实例2:
--> 生成测试数据表:Test1
IF NOT OBJECT_ID('[Test1]') IS NULL
DROP TABLE [Test1]
GO
CREATE TABLE [Test1]([id] INT,[parentid] INT,[categoryname] NVARCHAR(10))
INSERT [Test1]
SELECT 1,0,'test1' UNION ALL
SELECT 2,0,'test2' UNION ALL
SELECT 3,1,'test1.1' UNION ALL
SELECT 4,2,'test2.1' UNION ALL
SELECT 5,3,'test1.1.1' UNION ALL
SELECT 6,1,'test1.2'
GO
SELECT * FROM [Test1]
-->SQL查询如下:
;WITH T AS
(
SELECT *,CAST(ID AS VARBINARY(MAX)) AS px
FROM Test1 AS A
WHERE NOT EXISTS(SELECT * FROM Test1 WHERE id=A.[parentid])
UNION ALL
SELECT A.*,CAST(B.px+CAST(A.ID AS VARBINARY) AS VARBINARY(MAX))
FROM Test1 AS A
JOIN T AS B
ON A.[parentid]=B.id
)
SELECT [id],[parentid],[categoryname] FROM T
ORDER BY px
/*
id parentid categoryname
----------- ----------- ------------
1 0 test1
3 1 test1.1
5 3 test1.1.1
6 1 test1.2
2 0 test2
4 2 test2.1
(6 行受影响)
*/
--实例3:
if object_id('#') Is Not Null
Drop Table #
Create Table #
(
ID int ,
ParentID int,
level smallint,
value nvarchar(10)
)
Go
insert into #(ID,ParentID,level,value)
Select 1,0,1,'Root' Union All
Select 2,1,2,'A1' Union All
Select 3,1,2,'B1' Union All
Select 4,1,2,'C1' Union All
Select 5,2,3,'A11' Union All
Select 6,3,3,'B11' Union All
Select 7,5,4,'A111' Union All
Select 8,6,4,'B111' Union All
Select 9,8,5,'B1111'
Go
select * from #
;With CTE_Seq As
(
Select ID,ParentID,level,value,convert(nvarchar(200),rtrim(id)) As IDPath From # Where ParentID=0
Union All
Select b.ID,b.ParentID,b.level,b.value,convert(nvarchar(200),a.IDPath+'.'+rtrim(b.id)) As IDPath
From CTE_Seq As a
Inner Join # As b On b.ParentID=a.ID
)
Select value,level,IDPath
From CTE_Seq
Order By IDPath
/*
value level IDPath
---------- ------ ----------
Root 1 1
A1 2 1.2
A11 3 1.2.5
A111 4 1.2.5.7
B1 2 1.3
B11 3 1.3.6
B111 4 1.3.6.8
B1111 5 1.3.6.8.9
C1 2 1.4
*/
--实例4:
if OBJECT_ID('tempdb..#t') is not null
drop table #t
select 1
ID, '001'
Code , 'News'
Name , 1 SortID
into #t
union all select 2
, '001001'
, 'News1-1'
, 1
union all select 3
, '001002'
, 'News1-2'
, 2
union all select 4
, '001002001'
, 'News1-2-1'
, 1
union all select 5
, '002'
, 'Soft'
, 2
union all select 6
, '002001'
, 'Soft1-1'
, 1
union all select 7
, '002002'
, 'Soft1-2'
, 2
union all select 8
, '002003'
, 'Soft1-3'
, 3
union all select 9
, '002003001'
, 'Soft1-3-1'
, 1
union all select 10
, '002003001001',
'Soft1-3-1-1' , 1
union all select 11
, '002004'
, 'Soft1-4'
, 4
union all select 12
, '002002001'
, 'Soft1-2-1'
, 1
;with t as
(
select *,levelid=1,parentid=0
from #t
where ID in (1,5)
union all
select b.ID,b.Code,b.Name,b.SortID,levelid=a.levelid+1,parentid=a.id
from t a
join #t b
on a.Code= substring(b.code,1,LEN(a.code)) and LEN(b.code)>LEN(a.code)
)
select Id,code,name,sortid,max(levelid) as levelid,max(parentid) as parentid
from t
group by Id,code,name,sortid
order by left(code,4),levelid
/*
1
001
News
1
1
0
2
001001
News1-1
1
2
1
3
001002
News1-2
2
2
1
4
001002001
News1-2-1
1
3
3
5
002
Soft
2
1
0
6
002001
Soft1-1
1
2
5
7
002002
Soft1-2
2
2
5
8
002003
Soft1-3
3
2
5
11
002004
Soft1-4
4
2
5
12
002002001
Soft1-2-1
1
3
7
9
002003001
Soft1-3-1
1
3
8
10
002003001001
Soft1-3-1-1
1
4
9
*/
--实例5:
DECLARE @tb table(DeptID int ,PDeptID int)
insert into @tb(DeptID,PDeptID)
select 1234 ,0 union all
select 4836 ,0 union all
select 5106 ,4836 union all
select 3721 ,5106 union all
select 5107 ,4836 union all
select 3941 ,3721;
--select * from @tb;
with cte as
(
select DeptID,PDeptID from @tb
where DeptID =4836
union all
select t2.DeptID,t2.PDeptID from @tb t2
inner join cte t1 --建议CTE放在后面,否则会进入无限循环
on t1.DeptID= t2.PDeptID
)select * from cte
--实例6:
if OBJECT_ID('tb') is not null
drop table tb
go
create table tb
(
id int,
code varchar(100),
name varchar(100),
sortid int
)
insert into tb
select 1
, '001'
, 'News'
Name , 1 SortID
union all select 2
, '001001'
, 'News1-1'
, 1
union all select 3
, '001002'
, 'News1-2'
, 2
union all select 4
, '001002001'
, 'News1-2-1'
, 1
union all select 5
, '002'
, 'Soft'
, 2
union all select 6
, '002001'
, 'Soft1-1'
, 1
union all select 7
, '002002'
, 'Soft1-2'
, 2
union all select 8
, '002003'
, 'Soft1-3'
, 3
union all select 9
, '002003001'
, 'Soft1-3-1'
, 1
union all select 10
, '002003001001',
'Soft1-3-1-1', 1
union all select 11
, '002004'
, 'Soft1-4'
, 4
union all select 12
, '002002001'
, 'Soft1-2-1'
, 1
select * from tb
declare @code varchar(100);
--比如,你要查询 001002的所有父级菜单,以及001002的子集菜单的记录
set @code = '001002'
--查询所有父级菜单,以及子菜单
select *
from tb
where (code like LEFT(@code,3) + '%' and LEN(code)< LEN(@code)) --查询上级
or
(code like @code + '%') --查询下级
/*
id
code
name
sortid
1
001
News
1
2
001001
News1-1
1
3
001002
News1-2
2
4
001002001
News1-2-1
1
*/
-- =========================================================
/*(77)======================================================
需求原因:
/*表1:TEST1 字段: A1 、 B1
表2:TEST2 字段: A1、G1
把表1 字段B 赋值给表2 G字段 (把原来数据也替代)
触发器语句:*/
=========================================================*/
CREATE TABLE test_20 (A1 INT IDENTITY, B1 VARCHAR(10))
CREATE TABLE test_21 (A1 INT IDENTITY, G1 VARCHAR(10))
INSERT INTO test_20(B1) VALUES ('beijing')
INSERT INTO test_21(G1) VALUES ('shanghai')
select * from test_20
select * from test_21
CREATE TRIGGER tri_upd_test_20_B1_test_21_G1
ON test_20
AFTER UPDATE
AS
BEGIN
SET NOCOUNT ON;
UPDATE G SET G.G1=INSERTED.B1 FROM INSERTED JOIN test_21 G ON INSERTED.A1=G.A1
END
GO
UPDATE test_20 SET b1='changsha'
-- =========================================================
/*(78)======================================================
需求原因:
修改sa的密码
=========================================================*/
ALTER LOGIN sa WITH PASSWORD = 'sa';
-- =========================================================
/*(79)======================================================
需求原因:
--标题: 应用实例之SQL SERVER 正则替换
/*
假设测试数据为:
col
----------------------
192abc168xx0yya101baaa
10hh176bag98job121zero
hello112u19aa110beyp45
a80abab230pppp120qu224
121nile21reply30vall90
想要得到的结果(把字段中的连续的字母替换成'.'):
col
--------------
192.168.0.101
10.176.98.121
112.19.110.45
80.230.120.224
121.21.30.90
*/
=========================================================*/
--====================================
--标题: 应用实例之SQL SERVER 正则替换
--说明:MS-SQL SERVER 中的正则替换
--测试数据:
if object_id('[tb]') is not null drop table [tb]
create table [tb] (col varchar(100))
insert into [tb]
select '192abc168xx0yya101baaa' union all
select '10hh176bag98job121zero' union all
select 'hello112u19aa110beyp45' union all
select 'a80abab230pppp120qu224' union all
select '121nile21reply30vall90'
--本示例在SQL SERVER 2005版本即可适用。
--正常思路
--a)游标循环截取(略)
--b)自定义函数
go
create function [dbo].[fn_replace]
(
@str nvarchar(100)
)
returns varchar(100)
as
begin
while patindex('%[a-z]%',@str) > 0
begin
set @str = stuff(@str,patindex('%[a-z]%',@str),1,N'.');
end
while (charindex('..',@str)<>0)
begin
set @str=replace(@str,'..','.')
end
if(left(@str,1)='.') set @str=right(@str,len(@str)-1)
if(right(@str,1)='.') set @str=left(@str,len(@str)-1)
return @str
end
go
select dbo.[fn_replace](col) as col from [tb]
/*
col
---------------
192.168.0.101
10.176.98.121
112.19.110.45
80.230.120.224
121.21.30.90
*/
--c)其他方法,这里我主要介绍一下正则替换,因为patindex和like 能够支持的正则还是非常少的
--正则替换
--开启xp_cmdshell
--不开启会提示:SQL Server blocked access to procedure 'xp_cmdshell'
sp_configure 'show advanced options', 1
go
reconfigure
go
sp_configure 'xp_cmdshell', 1
go
reconfigure
--开启sp_OACreate
--不开启会提示:SQL Server blocked access to procedure 'sys.sp_OACreate'
sp_configure 'show advanced options', 1;
go
reconfigure;
go
sp_configure 'ole automation procedures', 1;
go
reconfigure;
go
--创建函数
create function [dbo].[regexReplace]
(
@source varchar(8000), --字符串
@regexp varchar(500), --正则表换式
@replace varchar(500), --替换值
@globalReplace bit = 0, --是否是全局替换
@ignoreCase bit = 0 --是否忽略大小写
)
returns varchar(1000) AS
begin
declare @hr int
declare @objRegExp int
declare @result varchar(5000)
exec @hr = sp_OACreate 'VBScript.RegExp', @objRegExp output
if @hr <> 0
begin
exec @hr = sp_OADestroy @objRegExp
return null
end
exec @hr = sp_OASetProperty @objRegExp, 'Pattern', @regexp
if @hr <> 0
begin
exec @hr = sp_OADestroy @objRegExp
return null
end
exec @hr = sp_OASetProperty @objRegExp, 'Global', @globalReplace
if @hr <> 0
begin
exec @hr = sp_OADestroy @objRegExp
return null
end
exec @hr = sp_OASetProperty @objRegExp, 'IgnoreCase', @ignoreCase
if @hr <> 0
begin
exec @hr = sp_OADestroy @objRegExp
return null
end
exec @hr = sp_OAMethod @objRegExp, 'Replace', @result output, @source, @replace
if @hr <> 0
begin
exec @hr = sp_OADestroy @objRegExp
return null
end
exec @hr = sp_OADestroy @objRegExp
if @hr <> 0
begin
return null
end
/* 注释A
--
while (charindex('..',@result)<>0)
--
begin
--
set @result=replace(@result,'..','.')
--
end
-- if(left(@result,1)='.')
--
set @result=right(@result,len(@result)-1)
-- if(right(@result,1)='.')
--
set @result=left(@result,len(@result)-1)
*/
return @result
end
--查看结果
go
select dbo.regexReplace(col,'[a-z]','.',1,0) as col from [tb]
/*
col
-----------------------
192...168..0...101....
10..176...98...121....
.....112.19..110....45
.80....230....120..224
121....21.....30....90
*/
--根据正则把字母替换成'.'后的结果和想要结果并不相同
--需要把函数中的"注释A"取消注释,才能保证结果相同,那就不如直接用上述自定义函数
--那么有没有其他办法呢?
--tb表中的字符长度为100,那么修改正则表达式,把连续的替换成'.'试一试
select dbo.regexReplace(col,'[a-z]{1,100}','.',1,0) as col from [tb]
/*
col
------------------
192.168.0.101.
10.176.98.121.
.112.19.110.45
.80.230.120.224
121.21.30.90
*/
--结果还是不相同
--开头结尾还是有多余的'.'
--不想用left,right,substring截取,修改正则能不能搞定呢?
--再修改一下
select
col=dbo.regexReplace(dbo.regexReplace(col,'[a-z]{1,100}','.',1,0),'^\.{1}|\.{1}$','',1,0)
from [tb]
/*
col
----------------
192.168.0.101
10.176.98.121
112.19.110.45
80.230.120.224
121.21.30.90
*/
--这个例子对正则的应用还是比较简单的,我这里只是介绍一个思路。
--====================================
--标题: 应用实例之SQL SERVER 正则匹配
--====================================
/*
假设测试数据为:
col
----------
a b d c e
a a b c d
b b c d e
e u g h w
o a k d w
1)得到没有重复字母的行,即想要得到如下结果:
col
--------------
a b c d e
e u g h w
o p k n w
2)得到同时存在a和d,并且a和d之间只有0或是1个字母的,即想要得到的结果:
col
----------
a b d c e
o a k d w
*/
--测试数据
if object_id('[tb]') is not null drop table [tb]
create table [tb] (col varchar(10))
insert into [tb]
select 'a b d c e' union all
select 'a a b c d' union all
select 'b b c d e' union all
select 'e u g h w' union all
select 'o a k d w'
select * from [tb]
--本示例在SQL SERVER 2000版本即可适用。
go
create function dbo.RegexMatch
(
@pattern varchar(2000),
@matchstring varchar(8000)
)
returns int
as
begin
declare @objRegexExp int
declare @strErrorMessage varchar(255)
declare @hr int,@match bit
exec @hr= sp_OACreate 'VBScript.RegExp', @objRegexExp out
if @hr = 0
exec @hr= sp_OASetProperty @objRegexExp, 'Pattern', @pattern
if @hr = 0
exec @hr= sp_OASetProperty @objRegexExp, 'IgnoreCase', 1
if @hr = 0
exec @hr= sp_OAMethod @objRegexExp, 'Test', @match OUT, @matchstring
if @hr <>0
begin
return null
end
exec sp_OADestroy @objRegexExp
return @match
end
go
--1)得到没有重复字母的行
--正常思路,可能是按照空格分割后去重然后合并,最后判断长度(略)
--用正则就很方便了
select col from [tb] where dbo.RegexMatch('^.*?([a-z])[ ]\1.*?$',col)=0
/*
col
----------
a b d c e
e u g h w
o a k d w
*/
--2)得到同时存在a和d,并且a和d之间间隔小于等于一个字母的
--正常思路
select col from [tb]
where charindex('a',col)>0
and charindex('d',col)>0
and abs(charindex('a',col)-charindex('d',col))<5
/*
col
----------
a b d c e
o a k d w
*/
--正则处理
select col from [tb] where dbo.RegexMatch('.*a[a-z ]{1,3}d.*',col)=1
/*
col
----------
a b d c e
o a k d w
*/
--这里的正则写法考虑的就不全,如果d在a前面呢?
--那么修正一下
select col from [tb]
where dbo.RegexMatch('.*d[a-z ]{1,3}a.*|.*a[a-z ]{1,3}d.*',col)=1
/*
col
----------
a b d c e
o a k d w
*/
-- =========================================================
/*(80)======================================================
2015-06-26 17:14:56
需求原因:
示例表
姓名 入院日期 出院日期
aaaaa 20140101 20140115
aaaaa 20140201 20140220
bbbbb 20140101 20140115
bbbbb 20140115 20140205
bbbbb 20140301 20140320
cccccc 20140101 20140115
cccccc 20140115 20140201
cccccc 20140201 20140220
cccccc 20140220 20140305
希望得到
姓名 入院日期 出院日期
aaaaa 20140101 20140115
aaaaa 20140201 20140220
bbbbb 20140101 20140205
bbbbb 20140301 20140320
cccccc 20140101 20140305
=========================================================*/
with a1 (姓名,入院日期,出院日期) as
(
select 'aaaaa','20140101','20140115' union all
select 'aaaaa','20140201','20140220' union all
select 'bbbbb','20140101','20140115' union all
select 'bbbbb','20140115','20140205' union all
select 'bbbbb','20140301','20140320' union all
select 'cccccc','20140101','20140115' union all
select 'cccccc','20140115','20140201' union all
select 'cccccc','20140201','20140220' union all
select 'cccccc','20140220','20140305'
)
SELECT x.姓名,x.入院日期,MIN(y.出院日期) 出院日期
FROM
(
SELECT a.姓名,a.入院日期
FROM a1 a LEFT OUTER JOIN a1 b
ON a.姓名=b.姓名 and a.入院日期>b.入院日期 AND a.入院日期<=b.出院日期
GROUP BY a.姓名,a.入院日期
HAVING COUNT(b.入院日期)=0
) x
INNER JOIN
(
SELECT a.姓名,a.出院日期
FROM a1 a LEFT OUTER JOIN a1 b
ON a.姓名=b.姓名 and a.出院日期>=b.入院日期 AND a.出院日期 GROUP BY a.姓名,a.出院日期
HAVING COUNT(b.入院日期)=0
) y
ON x.姓名=y.姓名 and x.入院日期<=y.出院日期
GROUP BY x.姓名,x.入院日期
-- =========================================================
/*(81)======================================================
需求原因:
--要求找出 col,col2 值相同 并且 col3 值为 'D' 的重复行
=========================================================*/
if OBJECT_ID ('Tb1') is not null drop table Tb1
Create Table Tb1 (
colKey varchar(10) not null primary key ,
col1 varchar(10) null,
col2 varchar (10) null
,col3 varchar (10) null
)
go
---->测试数据
Insert into Tb1
Select 'key1' , 'aa1' , 'C' , 'D' union all
Select 'key2' , 'aa2' , 'C' , 'D' union all
Select 'key3' , 'aa3' , 'D' , 'D' union all
Select 'key4' , 'aa4' , 'D' , 'D' union all
Select 'key5' , 'aa5' , 'C' , 'C' union all
Select 'key6' , 'aa6' , 'D' , 'C' union all
Select 'key7' , 'aa3' , 'D' , 'D' union all
Select 'key8' , 'aa4' , 'D' , 'C' union all
Select 'key9' , 'aa3' , 'D' , 'C' union all
Select 'key10' , 'aa10' , 'C' , 'D' union all
Select 'key11' , 'aa3' , 'D' , 'C' union all
Select 'key12' , 'aa12' , 'C' , 'D'
/*方法1*/
with cte as (
select col1,col2,col3 from (
select *,ROW_NUMBER() over(partition by col1,col2 order by colkey) as qty from Tb1 where col3='D'
) a where qty>1 group by col1,col2,col3
)
select * from Tb1 where col1 in(select col1 from cte) and col2 in(select col2 from cte) and col3='D'
/*方法2*/
SELECT * FROM(
SELECT *,COUNT(1)OVER(PARTITION BY col1)C FROM tb1
WHERE col3='D'
)T WHERE C>=2
/*方法3*/
select * from Tb1 as a where exists(select 1 from Tb1 where col1=a.col1 and col2=a.col2 and col3=a.col3 and col3='D'
group by col1,col2 having COUNT(*)>1)
/*方法4*/
SELECT * FROM(
SELECT *,COUNT(1)OVER(PARTITION BY col1,col2)C FROM tb1
WHERE col3='D'
)T WHERE C>=2
/*方法5*/
WITH a1 AS
(
SELECT *,ROW_NUMBER() OVER(PARTITION BY col1,col2 ORDER BY GETDATE()) re
FROM Tb1
WHERE col3='D'
)
,a2 AS
(
SELECT col1,col2
FROM a1
GROUP BY col1,col2
HAVING MAX(re)>1
)
SELECT a.*
FROM a1 a
JOIN a2 b ON a.col1=b.col1 AND a.col2=b.col2
ORDER BY col1,col2,col3
-- =========================================================
/*(82)======================================================
需求原因:
将字符串45*120*100截取转化为数值计算
=========================================================*/
EXEC('select 45*120*100')
-- =========================================================
/*(83)======================================================
需求原因:2015-06-27 13:53:58
找出所有数据库
=========================================================*/
Select Name FROM Master..SysDatabases
-- =========================================================
/*(84)======================================================
需求原因:2015-06-27 13:53:58
压缩一个数据库
=========================================================*/
declare cur cursor for
Select Name FROM Master..SysDatabases -- 定义循环游标,从sysdatabases数据表中取出当前实例中的所有数据库,
declare @tb sysname
open cur
fetch next from cur into @tb --循环取得数据库的名称,
while @@fetch_status=0 --循环
begin
--压缩当前数据库
exec ('backup log ['+@tb+'] with no_log')
exec ('dbcc shrinkdatabase(['+@tb+'])')
-- 取下一个数据库.
fetch next from cur into @tb
end
close cur
deallocate cur
-- =========================================================
--以上总结时间:2015-06-09 21:58:28 晚上时间 (68)(69)(70)(71)
/*(85)======================================================
需求原因:2015-06-27 13:53:58
压缩一个数据库
=========================================================*/
declare cur cursor for
Select Name FROM Master..SysDatabases -- 定义循环游标,从sysdatabases数据表中取出当前实例中的所有数据库,
declare @tb sysname
open cur
fetch next from cur into @tb --循环取得数据库的名称,
while @@fetch_status=0 --循环
begin
--压缩当前数据库
exec ('backup log ['+@tb+'] with no_log')
exec ('dbcc shrinkdatabase(['+@tb+'])')
-- 取下一个数据库.
fetch next from cur into @tb
end
close cur
deallocate cur
-- =========================================================
/*(86)======================================================
需求原因:2015-06-28 13:58:34
带表参数的存储过程中不能创建临时表
=========================================================*/
CREATE PROCEDURE prTEST
@tbName nvarchar(20)
as
declare @sql nvarchar(4000)
set @sql='select * into ##s from '+@tbName
-- 不会接受参数
exec (@sql)
--下面这句会出错。
select * from ##s
--改为全局临时表:##s
-- =========================================================
/*(87)======================================================
需求原因:2015-06-28 14:34:02
=========================================================*/
--使用 SQL 事件探查器可以:
--
--监视 SQL Server 实例的性能。
--
--
--调试 Transact-SQL 语句和存储过程。
--
--
--识别执行慢的查询。
--
--
--在工程开发阶段,通过单步执行语句测试 SQL 语句和存储过程,以确认代码按预期运行。
-- =========================================================
/*(88)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(89)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(90)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(91)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(92)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(93)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(94)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(95)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(96)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(97)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(98)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(99)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(100)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(101)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(102)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(103)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(104)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(105)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(106)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(107)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(108)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(109)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(110)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(111)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(112)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(113)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(114)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(115)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(116)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(117)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(118)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(119)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(120)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(121)======================================================
需求原因:
=========================================================*/
-- =========================================================
/*(122)======================================================
需求原因:
=========================================================*/
-- =========================================================
--2015-06-28 14:04:23