create table administrative_division2
(
administrative_division_sn bigint not null comment '行政区划代码'
primary key,
parent_administrative_division_sn bigint null comment '上级行政区划代码',
status tinyint default 1 not null comment '状态',
name varchar(28) not null comment '名称*',
full_name varchar(200) null comment '行政区划全路径名称,省市县全路径名称'
)
comment '行政区划';
INSERT INTO administrative_division2 (administrative_division_sn, parent_administrative_division_sn, status, name, full_name) VALUES (110000, null, 1, '北京市', '');
INSERT INTO administrative_division2 (administrative_division_sn, parent_administrative_division_sn, status, name, full_name) VALUES (110100, 110000, 1, '北京市市辖区', '');
INSERT INTO administrative_division2 (administrative_division_sn, parent_administrative_division_sn, status, name, full_name) VALUES (110101, 110100, 1, '东城区', '');
INSERT INTO administrative_division2 (administrative_division_sn, parent_administrative_division_sn, status, name, full_name) VALUES (110102, 110100, 1, '西城区', '');
INSERT INTO administrative_division2 (administrative_division_sn, parent_administrative_division_sn, status, name, full_name) VALUES (110105, 110100, 1, '朝阳区', '');