自连接-省市问题
TblArea 字段 AreaId、 AreaName、AreaPid
select
t1.AreaId 城市编号,
t2.AreaName 城市名称,
t1.AreaName 省份名称
from TblArea as t1
inner join TblArea as t2 on t1.AreaId=t2.AreaPid
树立目标,保持活力,gogogo!
TblArea 字段 AreaId、 AreaName、AreaPid
select
t1.AreaId 城市编号,
t2.AreaName 城市名称,
t1.AreaName 省份名称
from TblArea as t1
inner join TblArea as t2 on t1.AreaId=t2.AreaPid