---
title: SET COLLATION
description: Set the default collation for the current session with SET COLLATION in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-collation
---

# SET 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).

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. For details on how the default collation interacts with other collations, see [Collation precedence](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-collation.md#collation-precedence).

## Syntax

```
SET COLLATION collation_name
```

## Parameters

* **[collation\_name](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-names.md#collation-name)**

  The name of the collation. 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).

## 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
```

## Related articles

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