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

Blogs

Learn about Modern Microsoft Apps in San Diego

By

I wrote about learning today for the editorial: I Can’t Make You Learn. I...

How To Deploy Fabric SQL and Azure SQL Databases with Azure DevOps

By

Fabric has CI/CD built in, but if you've tried to use it for database...

A New Word: Attriage

By

attriage – n. the state of having lost all control over how you feel...

Read the latest Blogs

Forums

Alamat Kontak Bank BCA KCP Ubud Telp:08218154393

By Layanan_BCA_24jam

WA:08218154393 Jl. Raya Ubud No.10, Petulu, Kecamatan Ubud, Kabupaten Gianyar, Bali 80571

Alamat Kontak Bank BCA KCP Maluku Telp:08218154393

By Layanan_24jam

WA:08218154393 Jl. Maluku No.10, Dauh Puri, Kec. Denpasar Bar., Kota Denpasar, Bali 80119

Alamat Kontak Bank BCA KCP Ciawi Telp:08218154393

By Layanan_BCA

WA:08218154393 Jl. Raya Ciawi No.151, Pakemitan, Kec. Ciawi, Kabupaten Tasikmalaya, Jawa Barat 46156

Visit the forum

Question of the Day

BIT_COUNT II

In SQL Server 2025, I have a table (dbo.UserPermission) that contains this data:

UserID  UserPermissions
15
23
37
4       NULL
What is returned when I run this code:
select bit_count(UserPermissions) as PermissionCount
from dbo.UserPermission
where UserID = 4;

See possible answers