摘要: --1.cte版本,限制100级递归ifobject_id(N'getroot')>0dropfunctiongetrootGOcreatefunctiongetroot(@nootIDint,@isrootint--0为找子节点,其他为找父节点)returnstableasreturnwithtroot(id,ParentId,cityname)as(selectid,ParentId,c... 阅读全文
posted @ 2010-09-19 23:07 qanholas 阅读(703) 评论(0) 推荐(0)