mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 03:52:15 +00:00
31 lines
575 B
Markdown
31 lines
575 B
Markdown
---
|
|
slug: /en/sql-reference/statements/alter/named-collection
|
|
sidebar_label: NAMED COLLECTION
|
|
---
|
|
|
|
# ALTER NAMED COLLECTION
|
|
|
|
This query intends to modify already existing named collections.
|
|
|
|
**Syntax**
|
|
|
|
```sql
|
|
ALTER NAMED COLLECTION [IF EXISTS] name [ON CLUSTER cluster]
|
|
[ SET
|
|
key_name1 = 'some value',
|
|
key_name2 = 'some value',
|
|
key_name3 = 'some value',
|
|
... ] |
|
|
[ DELETE key_name4, key_name5, ... ]
|
|
```
|
|
|
|
**Example**
|
|
|
|
```sql
|
|
CREATE NAMED COLLECTION foobar AS a = '1', b = '2';
|
|
|
|
ALTER NAMED COLLECTION foobar SET a = '2', c = '3';
|
|
|
|
ALTER NAMED COLLECTION foobar DELETE b;
|
|
```
|