2023-07-27 06:42:38 +00:00
|
|
|
---
|
|
|
|
slug: /en/sql-reference/statements/alter/named-collection
|
|
|
|
sidebar_label: NAMED COLLECTION
|
|
|
|
---
|
|
|
|
|
2024-06-27 19:15:48 +00:00
|
|
|
import CloudNotSupportedBadge from '@theme/badges/CloudNotSupportedBadge';
|
|
|
|
|
|
|
|
<CloudNotSupportedBadge />
|
|
|
|
|
2023-07-27 06:42:38 +00:00
|
|
|
# ALTER NAMED COLLECTION
|
|
|
|
|
|
|
|
This query intends to modify already existing named collections.
|
|
|
|
|
|
|
|
**Syntax**
|
|
|
|
|
|
|
|
```sql
|
|
|
|
ALTER NAMED COLLECTION [IF EXISTS] name [ON CLUSTER cluster]
|
|
|
|
[ SET
|
2023-10-17 13:32:34 +00:00
|
|
|
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
|
|
|
... ] |
|
|
|
|
[ DELETE key_name4, key_name5, ... ]
|
|
|
|
```
|
|
|
|
|
|
|
|
**Example**
|
|
|
|
|
|
|
|
```sql
|
2023-10-17 13:32:34 +00:00
|
|
|
CREATE NAMED COLLECTION foobar AS a = '1' NOT OVERRIDABLE, b = '2';
|
2023-07-27 06:42:38 +00:00
|
|
|
|
2023-10-17 13:32:34 +00:00
|
|
|
ALTER NAMED COLLECTION foobar SET a = '2' OVERRIDABLE, c = '3';
|
2023-07-27 06:42:38 +00:00
|
|
|
|
|
|
|
ALTER NAMED COLLECTION foobar DELETE b;
|
|
|
|
```
|