Renames databases, tables, or dictionaries. Several entities can be renamed in a single query. Note that theDocumentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
RENAME query with several entities is non-atomic operation. To swap entities names atomically, use the EXCHANGE statement.
Syntax
RENAME DATABASE
Renames databases. SyntaxRENAME TABLE
Renames one or more tables. Renaming tables is a light operation. If you pass a different database afterTO, the table will be moved to this database. However, the directories with databases must reside in the same file system. Otherwise, an error is returned.
If you rename multiple tables in one query, the operation is not atomic. It may be partially executed, and queries in other sessions may get Table ... does not exist ... error.
Syntax