Edit

JARO_WINKLER_SIMILARITY (Transact-SQL)

Applies to: SQL Server 2025 (17.x) Azure SQL Database Azure SQL Managed Instance SQL analytics endpoint in Microsoft Fabric and Warehouse in Microsoft Fabric SQL database in Microsoft Fabric

Calculates a similarity value ranging from 0 (indicating no match) to 100 (indicating full match).

Note

  • JARO_WINKLER_SIMILARITY is generally available starting with SQL Server 2025 (17.x) CU11. On earlier SQL Server 2025 builds, the function is in preview. If it isn't enabled by default on your build, enable PREVIEW_FEATURES by setting it to ON.
  • JARO_WINKLER_SIMILARITY is available in Azure SQL Managed Instance with the SQL Server 2025 or Always-up-to-date update policy.

Syntax

JARO_WINKLER_SIMILARITY (
    character_expression
    , character_expression
)

Arguments

character_expression

An alphanumeric expression of character data. character_expression can be a constant, variable, or column. The character expression can't be of type varchar(max) or nvarchar(max).

Return value

int

Remarks

This function implements the Jaro-Winkler edit distance algorithm and calculates the similarity value.

Examples

A. Calculate Jaro-Winkler similarity between two words

The following example compares two words and returns the JARO_WINKLER_SIMILARITY value as a column, named Similarity.

SELECT 'Colour' AS WordUK,
       'Color' AS WordUS,
       JARO_WINKLER_SIMILARITY('Colour', 'Color') AS Similarity;

Returns:

WordUK WordUS Similarity
------ ------ -------------
Colour Color  97

For more examples, see the Examples section in the Fuzzy string matching overview.