SQL enhancements
Db2 12.1.2 includes new scalar functions that enhance the behavior and capability of SQL statements within Db2.
Attention: The Db2 12.1.2 release is currently available for the
following Db2® products:
- Db2 Distributed (on-premises)
- The container micro-service deployments of Db2 and Db2 Warehouse for Kubernetes-based clusters, which includes Red Hat OpenShift, the Amazon Elastic Kubernetes Service (EKS), the Red Hat OpenShift Service on AWS (ROSA), and the Azure Kubernetes Service (AKS).
The following table displays SQL statement enhancements now available in Db2
12.1.2:
Enhancement | Description |
---|---|
New numeric scalar function PI() | The PI function returns the value of π 3.141592653589793. For more information, see PI scalar function. |
New VECTOR data type | The Db2 VECTOR data type allows you to store vector data from popular AI applications in Db2 12.1.2. In addition to storing vector data, Db2 can convert the data into a format that can be queried by using SQL statements. The supported coordinate types are INT8 and REAL/FLOAT32. For more information, see Vector values. |
New VECTOR functions | The following VECTOR functions allow you to store, convert, and work with vector data in
Db2
12.1.2:
|
New scalar function VARCHAR_FORMAT_BINARY | The VARCHAR_FORMAT_BINARY function returns a character string representation of a bit string that is formatted by using a format string. |
New synonym scalar function ARRAY_MAX_CARDINALITY | A synonym for the MAX_CARDINALITY function, the ARRAY_MAX_CARDINALITY scalar function returns a value of type BIGINT that represents the maximum number of elements that an array can contain. |
New synonym scalar function HASHED_VALUE | A synonym for the HASHEDVALUE function, the HASHED_VALUE scalar function returns the distribution map index of the row that is obtained by applying the partitioning function on the distribution key value of the row. |