CTE

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 […]

(5)

You rated this post out of 5. Change rating

2021-04-19

8,144 reads

Blogs

PlanTrace Now Supports PostgreSQL

By

PlanTrace Now Supports PostgreSQL The same plan analysis you know from...

A New Word: the Kinder Surprise

By

the kinder surprise – . the point in your early adolescence when you realize...

Crash-Consistent Snapshot Cloning - Hyper-V Edition

By

If you’ve been following my T-SQL Snapshot Backup series, most of what I’ve covered...

Read the latest Blogs

Forums

BCA KCP Arundina Cibubur CSTelpon : 0853-73737551

By drsushmadikhit

CSTelpon : 0853-73737551 Blk BA, Jl. Cibubur Indah Jl. Lap. Tembak No.26 Blok A/24,...

BCA KCP Pondok Gede CSTelpon : 0853-73737551

By drsushmadikhit

CSTelpon : 0853-73737551 Jl. Raya Pd. Gede No.43, RT.1/RW.7, Lubang Buaya, Kec. Cipayung, Kota...

BCA KCP Kalimalang CSTelpon : 0853-73737551

By drsushmadikhit

Jl. Inspeksi Kav. PTB Blok A 2 No. 2 C-D, RT.1/RW.4, Pd. Klp., Wil,...

Visit the forum

Question of the Day

The Distance Metric

In the new VECTOR_DISTANCE() function in SQL Server 2025, the first parameter is the distance_metric. What is this?

See possible answers