首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

怎么在sqlserver实现oracle中START WITH id = '' CONNECT BY PRIOR id=p_id语句

2012-09-29 
如何在sqlserver实现oracle中START WITH id CONNECT BY PRIOR idp_id语句--oracle中的 START WITH i

如何在sqlserver实现oracle中START WITH id = '' CONNECT BY PRIOR id=p_id语句

--oracle中的 START WITH id = '' CONNECT BY PRIOR id=p_id 如何在sqlserver中实现呢。最好的解决办法:WITH NODES    AS (  SELECT * FROM DBO.T_ADMIN_RMS_CD C WHERE C.XH = '200909271033495d64880c587a4beda5bbac86fd92e0ec' UNION ALL    SELECT CSC.*FROM T_ADMIN_RMS_CD AS CSC INNER JOIN   NODES  AS RC ON CSC.FCDXH = RC.XH)    SELECT FROM T_ADMIN_RMS_CD WHERE XH IN (SELECT XH  FROM NODES N )   

热点排行