From 561daee66f170abf5334987afd2cf62ab93840f5 Mon Sep 17 00:00:00 2001 From: Tuan Pham Anh Date: Tue, 10 Sep 2024 10:24:31 +0000 Subject: [PATCH] Update document --- docs/en/sql-reference/statements/create/table.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 74e422faae4..250cddb09dc 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -46,13 +46,13 @@ Creates a table with the same structure as another table. You can specify a diff ### With a Schema and Data Cloned from Another Table ``` sql -CREATE TABLE [IF NOT EXISTS] [db.]table_name CLONE AS [db2.]name2 +CREATE TABLE [IF NOT EXISTS] [db.]table_name CLONE AS [db2.]name2 [ENGINE = engine] ``` -Creates a table with the same structure as another table. After the new table is created, all partitions from `db2.name2` are attached to it. In other words, the data of `db2.name2` is cloned into `db.table_name` upon creation. This query is equivalent to the following: +Creates a table with the same structure as another table. You can specify a different engine for the table. If the engine is not specified, the same engine will be used as for the `db2.name2` table. After the new table is created, all partitions from `db2.name2` are attached to it. In other words, the data of `db2.name2` is cloned into `db.table_name` upon creation. This query is equivalent to the following: ``` sql -CREATE TABLE [IF NOT EXISTS] [db.]table_name AS [db2.]name2; +CREATE TABLE [IF NOT EXISTS] [db.]table_name AS [db2.]name2 [ENGINE = engine]; ALTER TABLE [db.]table_name ATTACH PARTITION ALL FROM [db2].name2; ```