Note
ამ გვერდზე წვდომა ავტორიზაციას მოითხოვს. შეგიძლიათ სცადოთ შესვლა ან დირექტორიების შეცვლა.
ამ გვერდზე წვდომა ავტორიზაციას მოითხოვს. შეგიძლიათ სცადოთ დირექტორიების შეცვლა.
Applies to:
Databricks SQL
Databricks Runtime 18 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.
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 for the complete derivation rules and 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.
Setting
The parameter must be set to a collation_name.
Common collations are:
UTF8_BINARYUTF8_LCASEUNICODEUNICODE_CI
For a complete list of supported collations, see Supported collations.
System default
The system default is UTF8_BINARY.
Examples
> 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