Help wanted!
The following content of this documentation page has been machine-translated. But unlike other websites, it is not done on the fly. This translated text lives on GitHub repository alongside main ClickHouse codebase and waits for fellow native speakers to make it more human-readable. You can also use the original English version as a reference.
Help ClickHouse documentation by editing this page
数字
numbers(N)
– Returns a table with the single ‘number’ 包含从0到N-1的整数的列(UInt64)。numbers(N, M)
-返回一个表与单 ‘number’ 包含从N到(N+M-1)的整数的列(UInt64)。
类似于 system.numbers
表,它可以用于测试和生成连续的值, numbers(N, M)
比 system.numbers
.
以下查询是等效的:
SELECT * FROM numbers(10);
SELECT * FROM numbers(0, 10);
SELECT * FROM system.numbers LIMIT 10;
例:
-- Generate a sequence of dates from 2010-01-01 to 2010-12-31
select toDate('2010-01-01') + number as d FROM numbers(365);
当前内容版权归 ClickHouse 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ClickHouse .