> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 包含一个名为 `prime` 的 UInt64 列的系统表，该列按升序存储从 2 开始的质数。

# system.primes

<div id="description">
  ## 描述
</div>

此表仅包含一个名为 `prime` 的 UInt64 列，其中存储的是从 2 开始按升序排列的质数。

你可以将此表用于测试，或者在需要对质数进行暴力搜索时使用。

对此表的读取不支持并行处理。

它与 [`primes`](/zh/reference/functions/table-functions/primes) 表函数类似。

你也可以使用谓词来限制输出。

<div id="columns">
  ## 列
</div>

{/*AUTOGENERATED_END*/}

<div id="example">
  ## 示例
</div>

前 10 个质数。

```sql theme={null}
SELECT * FROM system.primes LIMIT 10;
```

```response theme={null}
  ┌─prime─┐
  │     2 │
  │     3 │
  │     5 │
  │     7 │
  │    11 │
  │    13 │
  │    17 │
  │    19 │
  │    23 │
  │    29 │
  └───────┘
```

大于 1e15 的第一个质数。

```sql theme={null}
SELECT prime FROM system.primes WHERE prime > 1e15 LIMIT 1;
```

```response theme={null}
  ┌────────────prime─┐
  │ 1000000000000037 │ -- 1.00 千万亿
  └──────────────────┘
```
