摘要: 本文转载http://www.cnblogs.com/xqhppt/archive/2011/02/15/1955366.htmlwithcteas(selectId,Pid,DeptName,0aslvlfromDepartmentwhereId=2unionallselectd.Id,d.Pid,d.DeptName,lvl+1fromctecinnerjoinDepartmentdonc.Id=d.Pid)select*fromcte1表结构IdPidDeptName------------------------------------------------------------- 阅读全文
posted @ 2013-01-25 10:26 跟着阿笨一起玩.NET 阅读(421) 评论(0) 推荐(0) 编辑