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.

5 (1)

You rated this post out of 5. Change rating

2025-05-27

130 reads

Blogs

70 Years of Artificial Intelligence History in 15 Minutes

By

How long has AI been around in different domains? What was it called before...

PostgreSQL Database Optimization: Shrinking Tables and Indexes Explained

By

PostgreSQL is a powerful open-source relational database system, but over time, its tables and...

What a Summer Camp Kitchen Still Teaches Me

By

(2025-Aug-04) Taking my last week of vacation and then volunteering at a children's summer camp...

Read the latest Blogs

Forums

Page Compression, Unique Identifiers and Speed

By dbakevlar

Comments posted to this topic are about the item Page Compression, Unique Identifiers and...

The Double-Edged Sword of AI and Data Democratization

By dbakevlar

Comments posted to this topic are about the item The Double-Edged Sword of AI...

Direct Connection running Fast,Linked Server running Slow

By 892717952

Scenario 1 (Direct Connection - Fast): On Server B, when using SQL Server Management...

Visit the forum

Question of the Day

Page Compression, Unique Identifiers and Speed

Would using a UNIQUEIDENTIFIER as a clustered primary key improves page compression and speeds up inserts compared to INT IDENTITY?

See possible answers