标签:
1 WITH a AS 2 ( 3 SELECT * FROM dbo.db_UserGroup WHERE TB_UserGroupID=1 4 UNION ALL SELECT s.* FROM dbo.db_UserGroup AS s,a WHERE s.FK_ParentId=a.TB_UserGroupID 5 ) 6 SELECT * FROM a
sql server根据一级分类查询所有子级分类
原文地址:http://www.cnblogs.com/zr3411/p/5810245.html