2020-10-30 01:09:42 +00:00
---
2022-04-09 13:29:05 +00:00
sidebar_position: 53
sidebar_label: null function
2020-10-30 01:09:42 +00:00
---
2022-06-02 10:55:18 +00:00
# null
2020-10-30 01:09:42 +00:00
2020-11-10 14:54:53 +00:00
Creates a temporary table of the specified structure with the [Null ](../../engines/table-engines/special/null.md ) 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.
2020-10-30 01:09:42 +00:00
2021-07-29 15:20:55 +00:00
**Syntax**
2020-10-30 01:09:42 +00:00
``` sql
null('structure')
```
2021-07-29 15:20:55 +00:00
**Parameter**
2020-10-30 01:09:42 +00:00
- `structure` — A list of columns and column types. [String ](../../sql-reference/data-types/string.md ).
**Returned value**
2020-11-10 14:54:53 +00:00
A temporary `Null` -engine table with the specified structure.
2020-10-30 01:09:42 +00:00
**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;
```
2021-07-29 15:20:55 +00:00
See also:
2020-11-10 14:54:53 +00:00
- [Null table engine ](../../engines/table-engines/special/null.md )
2020-11-04 09:20:06 +00:00
2021-09-19 20:05:54 +00:00
[Original article ](https://clickhouse.com/docs/en/sql-reference/table-functions/null/ ) <!--hide-->