Scripts

Technical Article

T-SQL Table Valued Function to compare Semantic Versions

Semantic versioning (SemVer) is a standardized system for labeling software releases using a three-part number—major, minor, and patch—optionally followed by pre-release labels and build metadata. Comparing semantic versions is complex because it requires handling both numeric and string components, as well as special precedence rules for pre-releases and stable versions. SQL Server’s hierarchyid data type is ideally suited for comparing the numeric parts of semantic versions, enabling efficient and accurate ordering without the pitfalls of string comparison or manual parsing.

(1)

You rated this post out of 5. Change rating

2025-05-27

265 reads

Blogs

T-SQL Tuesday #200: When I Look at a Query …

By

This month is a milestone for T-SQL Tuesday. It’s number 200, which doesn’t sound...

Reflections on the Life of a DBA

By

The DBA life is fraught with pain. Those battles that we endure are mostly...

Moving On-Prem PostgreSQL to the Cloud: Picking the Right Path for Big Tables

By

Every PostgreSQL migration eventually hits the same fork in the road. The database is...

Read the latest Blogs

Forums

ALAMAT KONTAK BCA KCP Pecatu Telp:08218154393

By CS BCA

WA:08218154393 nomor 275 Blok 4, Jl. Raya Uluwatu dan 5 No.99, Ungasan, Kec. Kuta...

ALAMAT KONTAK BCA KCP Ubud Telp:08218154393

By Layanan.24.jam

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

ALAMAT KONTAK BCA KCP Benoa Telp:08218154393

By Layanan.bca

WA:08218154393 Jl. Suwung Batan Kendal No.2, Sesetan, Denpasar Selatan, Kota Denpasar, Bali 80222

Visit the forum

Question of the Day

TempDB Facts I

Can I set Accelerated Database Recovery on tempdb?

See possible answers