ClickHouse/docs/en/operations/system-tables/numbers.md

57 lines
973 B
Markdown
Raw Normal View History

2022-08-28 13:53:52 +00:00
---
2022-08-28 13:58:27 +00:00
slug: /en/operations/system-tables/numbers
2022-08-28 13:53:52 +00:00
---
2022-06-02 10:55:18 +00:00
# numbers
This table contains a single UInt64 column named `number` that contains almost all the natural numbers starting from zero.
You can use this table for tests, or if you need to do a brute force search.
Reads from this table are not parallelized.
**Example**
```sql
SELECT * FROM system.numbers LIMIT 10;
```
```response
┌─number─┐
│ 0 │
│ 1 │
│ 2 │
│ 3 │
│ 4 │
│ 5 │
│ 6 │
│ 7 │
│ 8 │
│ 9 │
└────────┘
2021-07-29 15:20:55 +00:00
10 rows in set. Elapsed: 0.001 sec.
```
You can also limit the output by predicates.
```sql
SELECT * FROM system.numbers < 10;
```
```response
┌─number─┐
│ 0 │
│ 1 │
│ 2 │
│ 3 │
│ 4 │
│ 5 │
│ 6 │
│ 7 │
│ 8 │
│ 9 │
└────────┘
10 rows in set. Elapsed: 0.001 sec.
```