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

123 reads

Blogs

Resource: Security Auditing for Databases

By

If you are responsible for securing databases, SQL Servers and others, I would strongly...

SQL Server Maintenance Plans

By

If you’re a DBA, sysadmin, IT manager, or Accidental DBA, you’ve probably seen SQL...

SQL Server 2025: Not Just a Database; A Data Engine Reimagined

By

Let us be honest; most database upgrades feel like a patchwork of performance tweaks...

Read the latest Blogs

Forums

Low Level design for Error Logging for Data Pipeline

By sqlgigs

Hello, May someone please help me how to design Error Logging for the Data...

Best Way to Repair SQL Database: How to Restore SQL Server?

By durrani

Comments posted to this topic are about the item Best Way to Repair SQL...

MongoDB and Python in action

By sabyda

Comments posted to this topic are about the item MongoDB and Python in action

Visit the forum

Question of the Day

Capacity Planning for an Existing SQL Server Workload?

You're tasked with planning capacity for a new SQL Server database workload. Which of the following is the most accurate way to determine how much CPU, memory, and I/O throughput your workload requires?  What single or multiple tools would you use to answer the questions around resource needs?

See possible answers