自连接-省市问题

 

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

 

posted @ 2017-12-11 23:00  hao_1234_1234  阅读(279)  评论(0编辑  收藏  举报