---
title: COLLATION
description: Set the default collation for the session with the COLLATION configuration parameter in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/parameters/collation
---

# COLLATION

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime 18 LTS and above

> [!NOTE]
>
> Databricks Runtime 18 is newer than Databricks Runtime 18.0, 18.1, and 18.2. Features that would previously have shipped as a later numbered version now ship as dated updates to Databricks Runtime 18 instead. For details, see [About unified release notes](https://docs.databricks.com/aws/en/release-notes/runtime/18.md#unified-format).

The `COLLATION` configuration parameter sets the default collation for the session.

The default collation applies to all string operations for which there is no explicit collation or implicit collation. See [Default collation](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-collation.md#default-collation) for the complete derivation rules and [Collation precedence](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-collation.md#collation-precedence) for how explicit and implicit collations override the default.

You can set this parameter at the session level using the [SET COLLATION statement](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-collation.md).

## Setting

The parameter must be set to a [collation\_name](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-names.md#collation-name).

Common collations are:

* `UTF8_BINARY`
* `UTF8_LCASE`
* `UNICODE`
* `UNICODE_CI`

For a complete list of supported collations, see [Supported collations](https://docs.databricks.com/aws/en/sql/language-manual/functions/collations.md#supported-collations).

## System default

The system default is `UTF8_BINARY`.

## Examples

```sql
> SET COLLATION UNICODE_CI;

-- Use the default (session) collation because c1 has no collation set.
> SELECT * FROM VALUES('hello'), ('Hello') AS T(c1) ORDER BY c1;
 hello
 Hello

-- The default collation also applies to string literals.
> SELECT 'a' = 'A';
 true

-- Reset the default collation back to the system default.
> SET COLLATION UTF8_BINARY;
> SELECT 'a' = 'A';
 false
```

## Related

* [Collation](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-collation.md)
* [SET COLLATION](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-collation.md)
* [`collations` table function](https://docs.databricks.com/aws/en/sql/language-manual/functions/collations.md)
