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,745 reads

Blogs

A New Word: Lilo

By

lilo– n. a friendship that can lie dormant for years only to pick right...

Learning Database Design and Power BI Performance

By

I spend my days working on and managing SQL Server instances—working days at least,...

Free SQL Training: Dive into Databases This December!

By

Want to learn SQL and get some real practice this December? Check out the...

Read the latest Blogs

Forums

Database Archive missing FK

By abdalah.mehdoini

Bonjour à tous, je vais bientôt démarrer un projet d'archivage de données pour alléger...

SQL Server 2005 service fails to start

By iluminadajung

Hello, I’ve been trying to install Ms SQL Server 2005 for over two weeks...

How to Repair Corrupt MySQL Tables

By Nisarg Upadhyay

Comments posted to this topic are about the item How to Repair Corrupt MySQL...

Visit the forum

Question of the Day

The Funny Dynamic SQL

What happens when I run this code:

EXEC sp_executesql N'PRINT 1; GO';

See possible answers