Skip to content

Latest commit

 

History

History
47 lines (39 loc) · 2.53 KB

File metadata and controls

47 lines (39 loc) · 2.53 KB
title Vector Functions (Transact-SQL)
description Vector functions perform operations on vector type allowing applications to store and manipulate vectors in SQL Server.
author WilliamDAssafMSFT
ms.author wiassaf
ms.reviewer damauri, pookam, randolphwest
ms.date 11/18/2025
ms.service sql
ms.subservice system-objects
ms.topic reference
ms.collection
ce-skilling-ai-copilot
ms.update-cycle 180-days
ms.custom
ignite-2025
helpviewer_keywords
vector search, system functions
dev_langs
TSQL
monikerRange =sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-current || =azuresqldb-mi-current || =fabric-sqldb

Vector functions

[!INCLUDE sqlserver2025-asdb-asmi-fabricsqldb]

The following scalar functions perform operations on vectors in binary format, allowing applications to store and manipulate vectors in the SQL Database Engine.

Note

Vector features are available in Azure SQL Managed Instance with the SQL Server 2025 or Always-up-to-date update policy.

All Vector functions support the Vector data type.

Function Description
VECTOR_DISTANCE Calculates the distance between two vectors using a specified distance metric.
VECTOR_SEARCH (preview) Return the closest vectors to a given query vector and distance metric using an approximate vector search algorithm.
VECTOR_NORM Takes a vector as an input and returns the norm of the vector (which is a measure of its length or magnitude) in a given norm type.
VECTOR_NORMALIZE Takes a vector as an input and returns the normalized vector, which is a vector scaled to have a length of 1 in a given norm type. Adjusts a vector so that its length is normalized following the rules of specified norm type.
VECTORPROPERTY Returns specific properties of a given vector.

Related content