with as 的用法 ,何位给解释下

with as 的用法 ,哪位给解释下WITH TEMP AS(SELECT id , ParentIDFROM Doc_TreeWHERE id @treeUNION ALL

with as 的用法 ,哪位给解释下
WITH TEMP AS
(
  SELECT id , ParentID
  FROM Doc_Tree
  WHERE id = @tree
  UNION ALL
  SELECT A.id , A.ParentID
  FROM TEMP AS B JOIN Doc_Tree AS A  ON A.ParentID = B.id
) with?as?
[解决办法]
你这个是递归吧..