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

Blogs

How to find free space in Azure PosgreSQL

By

I wanted to figure out how big (or approximately how big) my dump file...

T-SQL Tuesday #180: Good enough is perfect Roundup

By

This month, I prompted bloggers to discuss whether good enough is perfect. Thank you to all...

Using SQL Compare with Read-only Access

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Read the latest Blogs

Forums

Compare rows within the same table

By SQL Bee

I have a table. Structure in script below. I have to compare and see...

Microsoft Recommendations for Update Stats?

By Brandie Tarvin

I have an application team that is insisting on daily (and for some, weekly)...

how can i tell if our db2 driver is ms or ibm or other?

By stan

i see this in the definition of a linked server on our wh sql...

Visit the forum

Question of the Day

A Strange Result

What does this code return in SSMS 20 from SQL Server 2019?

select '|' + CHAR(0)+'abc' + '|';

See possible answers