ClickHouse/docs/en/sql-reference/statements/create/named-collection.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
908 B
Markdown
Raw Normal View History

2023-07-27 06:42:38 +00:00
---
slug: /en/sql-reference/statements/create/named-collection
sidebar_label: NAMED COLLECTION
---
import CloudNotSupportedBadge from '@theme/badges/CloudNotSupportedBadge';
<CloudNotSupportedBadge />
2023-07-27 06:42:38 +00:00
# CREATE NAMED COLLECTION
Creates a new named collection.
**Syntax**
```sql
CREATE NAMED COLLECTION [IF NOT EXISTS] name [ON CLUSTER cluster] AS
key_name1 = 'some value' [[NOT] OVERRIDABLE],
key_name2 = 'some value' [[NOT] OVERRIDABLE],
key_name3 = 'some value' [[NOT] OVERRIDABLE],
2023-07-27 06:42:38 +00:00
...
```
**Example**
```sql
CREATE NAMED COLLECTION foobar AS a = '1', b = '2' OVERRIDABLE;
2023-07-27 06:42:38 +00:00
```
**Related statements**
2023-07-27 06:42:38 +00:00
- [CREATE NAMED COLLECTION](https://clickhouse.com/docs/en/sql-reference/statements/alter/named-collection)
- [DROP NAMED COLLECTION](https://clickhouse.com/docs/en/sql-reference/statements/drop#drop-function)
**See Also**
- [Named collections guide](/docs/en/operations/named-collections.md)