摘要:
createtabletest(idint,namevarchar(10),parentidint)select*fromtestinsertintoTestvalues(1,'aa',-1)insertintoTestvalues(2,'aa',-1)insertintoTestvalues(3,'aa',1)insertintoTestvalues(4,'aa',1)insertintoTestvalues(5,'aa',3)declare@idint=1;withTestCTEas(select*fromte 阅读全文