SQL查询下级全部子分类(例如查询省下面全部的市,区)

with a as( select Id,Name,PId from CommodityType where Id=‘12’ union all select x.Id,a.Name,a.PId from CommodityType x,a where x.PId=a.Id) select * from aweb
相关文章
相关标签/搜索