sqlserver 2005无限极分类 获取 所有子分类
/***2005以上版本有效***/ CREATE procedure [dbo].[GetFolderChilds] ( @folderid uniqueidentifier ) as begin with T as ( SELECT * FROm Doc_Folder where FolderID = @folderid union all select a.* from Doc_Folder a join T b on a.ParentFolderID = b.FolderID ) select * from T end return GO