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

91 reads

Blogs

SQL Server Careers: Still a Goldmine, or a Dead End?

By

When you're searching about the future of a career in MS SQL Server, you're...

AI Destroying Creativity or Creative Industry

By

In 2025, artificial intelligence is no longer a futuristic concept—it’s a central force in...

DP-300 : How to Pass Azure Database Administrator Certification

By

As businesses increasingly migrate their databases to the cloud, the demand for skilled database...

Read the latest Blogs

Forums

The Long Weekend

By Grant Fritchey

Comments posted to this topic are about the item The Long Weekend

Need Help to implement the De Duplication

By bala2014

Dear All, Good Day. I have a requirement to implement de-duplication on customer data...

Own Your Mistakes

By Grant Fritchey

Comments posted to this topic are about the item Own Your Mistakes

Visit the forum

Question of the Day

Independence Day

The film independence day was released in 1996. Which of these queries returns that year is run today?

See possible answers