ClickHouse/docs/en/sql-reference/statements/exchange.md
lehasm 1ad5606c52
Update docs/en/sql-reference/statements/exchange.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-03 23:05:32 +03:00

893 B

toc_priority toc_title
49 EXCHANGE

EXCHANGE Statement

Exchanges the names of two tables or dictionaries atomically. This task can also be accomplished with a RENAME query using a temporary name, but the operation is not atomic in that case.

!!! note "Note" The EXCHANGE query is supported by the Atomic database engine only.

Syntax

EXCHANGE TABLES|DICTIONARIES [db0.]name_A AND [db1.]name_B

EXCHANGE TABLES

Exchanges the names of two tables.

Syntax

EXCHANGE TABLES [db0.]table_A AND [db1.]table_B

EXCHANGE DICTIONARIES

Exchanges the names of two dictionaries.

Syntax

EXCHANGE DICTIONARIES [db0.]dict_A AND [db1.]dict_B

See Also