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

> System table containing a single UInt64 column named `prime` that contains prime numbers in ascending order, starting from 2.

# system.primes

<h2 id="description">
  Description
</h2>

This table contains a single UInt64 column named `prime` that contains prime numbers in ascending order, starting from 2.

You can use this table for tests, or if you need to do a brute force search over prime numbers.

Reads from this table are not parallelized.

This is similar to the [`primes`](/reference/functions/table-functions/primes) table function.

You can also limit the output by predicates.

<h2 id="columns">
  Columns
</h2>

{/*AUTOGENERATED_END*/}

<h2 id="example">
  Example
</h2>

The first 10 primes.

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

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

The first prime greater than 1e15.

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

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