From 781980159c576f4d7982cf941e67150f58837995 Mon Sep 17 00:00:00 2001 From: Anna <42538400+adevyatova@users.noreply.github.com> Date: Mon, 19 Apr 2021 15:55:28 +0300 Subject: [PATCH] Update table.md --- docs/en/sql-reference/statements/create/table.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index bb501e7bc88..eb0aa885d04 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -50,18 +50,15 @@ Creates a table with the same result as that of the [table function](../../../sq ### From SELECT query {#from-select-query} ``` sql -CREATE TABLE [IF NOT EXISTS] [db.]table_name ENGINE = engine AS SELECT ... +CREATE TABLE [IF NOT EXISTS] [db.]table_name[(name1 [type1], name2 [type2], ...)] ENGINE = engine AS SELECT ... ``` -Creates a table with a structure like the result of the `SELECT` query, with the `engine` engine, and fills it with data from `SELECT`. +Creates a table with a structure like the result of the `SELECT` query, with the `engine` engine, and fills it with data from `SELECT`. Also you can explicitly specify columns description. If the table already exists and `IF NOT EXISTS` is specified, the query won’t do anything. There can be other clauses after the `ENGINE` clause in the query. See detailed documentation on how to create tables in the descriptions of [table engines](../../../engines/table-engines/index.md#table_engines). -!!! warning "Warning" - The `SELECT` results must match the table description, otherwise an exception is thrown. - **Example** Query: