> ## 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.

> 2 から始まる素数が昇順に格納された、`prime` という名前の UInt64 型カラムを 1 つ含むシステムテーブル。

# system.primes

<div id="description">
  ## 説明
</div>

このテーブルには `prime` という名前の UInt64 型のカラムが 1 つあり、2 から始まる素数が昇順で格納されています。

このテーブルは、テスト用途や、素数に対して総当たり探索を行う必要がある場合に使用できます。

このテーブルからの読み取りは並列化されません。

これは [`primes`](/ja/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兆
  └──────────────────┘
```
