先来设计一下表结构: create table city(id varchar(3) , pid varchar(3) , name varchar(10)); 下面我们造几条测试数据: INSERT INTO city values('001','0','宁波市');INSERT INTO city values('002','001','镇海区');INSERT INTO city values('003','001','北仑区');INSERT INTO city values('004'