ClickHouse/docs/en/sql-reference/table-functions/null.md
olgarev 115807e77a
DOCSUP-3043: Document the null function (ru) (#16795)
* my changes to gitignore

* Corrections in English docs and Russian docs added.

* TOC corrections

* TOC fixed

* Revert "my changes to gitignore"

This reverts commit 5884b1e79b.

* Update docs/en/sql-reference/table-functions/null.md

* Update docs/en/sql-reference/table-functions/null.md

* Update docs/ru/sql-reference/table-functions/null.md

* Update docs/ru/sql-reference/table-functions/null.md

Co-authored-by: Olga Revyakina <revolg@yandex-team.ru>
Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-11-10 17:54:53 +03:00

1.1 KiB

toc_priority toc_title
53 null function

null

Creates a temporary table of the specified structure with the Null table engine. According to the Null-engine properties, the table data is ignored and the table itself is immediately droped right after the query execution. The function is used for the convenience of test writing and demonstrations.

Syntax

null('structure')

Parameter

  • structure — A list of columns and column types. String.

Returned value

A temporary Null-engine table with the specified structure.

Example

Query with the null function:

INSERT INTO function null('x UInt64') SELECT * FROM numbers_mt(1000000000);

can replace three queries:

CREATE TABLE t (x UInt64) ENGINE = Null;
INSERT INTO t SELECT * FROM numbers_mt(1000000000);
DROP TABLE IF EXISTS t;

See also:

Original article