Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Azure SQL Database
Azure SQL Managed Instance
SQL database in Microsoft Fabric
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 in preview and are subject to change. Make sure to read preview usage terms in the Service Level Agreements (SLA) for Online Services document.
- Vector features are available in Azure SQL Managed Instance configured with the Always-up-to-date 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_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. |