ClickHouse/docs/en/sql-reference/table-functions/null.md
alexey-milovidov 1f323e98d1
Update null.md
2020-11-04 12:20:06 +03:00

928 B

toc_priority toc_title
53 null function

null

Accepts an inserted data of the specified structure and immediately drops it away. The function is used for convenience writing tests and demonstrations.

Syntax

null('structure')

Parameter

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

Returned value

A table with the specified structure, which is dropped right after the query execution.

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: format Null.

Original article