mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
Docs in English
This commit is contained in:
parent
19794bee07
commit
98f701dbfc
39
docs/en/sql-reference/table-functions/null.md
Normal file
39
docs/en/sql-reference/table-functions/null.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
toc_priority: 53
|
||||||
|
toc_title: null function
|
||||||
|
---
|
||||||
|
|
||||||
|
# null {#null-function}
|
||||||
|
|
||||||
|
Accepts an inserted data of the specified structure and immediately drops it away. The function is used for convenience writing tests and demos.
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
``` sql
|
||||||
|
null('structure')
|
||||||
|
```
|
||||||
|
|
||||||
|
**Parameter**
|
||||||
|
|
||||||
|
- `structure` — A list of columns and column types. [String](../../sql-reference/data-types/string.md).
|
||||||
|
|
||||||
|
**Returned value**
|
||||||
|
|
||||||
|
A table with the specified structure, which is dropped right after the query execution.
|
||||||
|
|
||||||
|
**Example**
|
||||||
|
|
||||||
|
Query with the `null` function:
|
||||||
|
|
||||||
|
``` sql
|
||||||
|
INSERT INTO function null('x UInt64') SELECT * FROM numbers_mt(1000000000);
|
||||||
|
```
|
||||||
|
can replace three queries:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE TABLE t (x UInt64) ENGINE = Null;
|
||||||
|
INSERT INTO t SELECT * FROM numbers_mt(1000000000);
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
```
|
||||||
|
|
||||||
|
[Original article](https://clickhouse.tech/docs/en/sql-reference/table-functions/null/) <!--hide-->
|
Loading…
Reference in New Issue
Block a user