当前位置: 代码迷 >> Sql Server >> with as 的用法 ,何位给解释下
  详细解决方案

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

热度:36   发布时间:2016-04-24 21:24:01.0
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?

------解决方案--------------------
你这个是递归吧..
  相关解决方案