Hierarchical Queries in SQL Server 2005

前端 未结 5 718
余生分开走
余生分开走 2020-11-29 07:43

Way back when I was working in an Oracle shop I took the CONNECT_BY for granted. Now I\'m stuck working with SQL Server 2005 and have some nasty object hierarchies. Specif

5条回答
  •  旧巷少年郎
    2020-11-29 08:22

    Having used both, I found CONNECT BY is somewhat more flexible and easier to use than CTE's. The question is not dissimilar to one I answered a few weeks ago. See Here for a brief comparison of CONNECT BY and CTE's and Here for an example of a query using CTE's.

提交回复
热议问题