collate expression

Preview

This feature is in Public Preview.

Applies to: Databricks SQL check marked yes Databricks Runtime 16.1 and above

Attaches an explicit collation collationName to strExpr.

For a list of valid collations see Supported collations.

Syntax

strExpr COLLATE collationName

Arguments

  • strExpr: A STRING expression.

  • collationName: A collation name to attach to strExpr.

Returns

A STRING with the same value as strExpr.

Examples

> SELECT collation('test' COLLATE UNICODE_CI);
 UNICODE_CI