Mathematics

SQLServerCentral Article

Navigating Trees With CTE

  • Article

Introduction This article shows how common table expressions (CTE) in SQL Server are naturally suited for navigating trees, such as finding its longest path, or diameter. Recall that a tree is an undirected graph where unique paths exist between any two nodes (i.e. vertices). Any node may be selected as its top node, with its […]

4.8 (5)

You rated this post out of 5. Change rating

2021-04-19

7,942 reads

Blogs

What is KTLO? Keep The Lights On vs Project Work in Agile

By

🔍 Demystifying KTLO: A Deep Dive into Keep The Lights On Work in IT...

The PASS Summit on Tour in Dallas

By

The PASS Summit goes on tour this year, with a September stop in Dallas....

SQL Server Auto-settings: The Good, the Bad, and the Ugly

By

Settings That Could Be Hurting Your Performance If you’ve ever created a new SQL...

Read the latest Blogs

Forums

How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory

By Chandan Shukla

Comments posted to this topic are about the item How a Legacy Logic Choked...

Upgrading from 2012 to 2022

By cajun_sql

Hi, Would it be possible to upgrade from sql server 2012 sp4 to sql...

Has the PK been used --

By dbakevlar

Comments posted to this topic are about the item Has the PK been used...

Visit the forum

Question of the Day

Has the PK been used --

You're analyzing a query execution plan in SQL Server to determine whether the query optimizer chose to use a primary key index. Which Dynamic Management View (DMV) would you use to verify the usage of the primary key in the plan?

See possible answers