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

> 乱数を生成するための関数のドキュメント

# 乱数を生成する関数

このセクションのすべての関数は、引数を 0 個または 1 個受け取ります。引数が指定された場合、その唯一の用途は [共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination) を防ぐことです。これにより、同じ乱数
関数を同一の行内で 2 回実行しても、それぞれ異なる乱数値が返されます。

関連コンテンツ

* ガイド: [ClickHouseでランダムデータを生成する](/ja/guides/clickhouse/data-modelling/generating-test-data)
* ブログ: [ClickHouseでランダムデータを生成する](https://clickhouse.com/blog/generating-random-test-distribution-data-for-clickhouse)

<Note>
  乱数は、暗号論的ではないアルゴリズムで生成されます。
</Note>

<Note>
  以下のドキュメントは、`system.functions` システムテーブルから生成されています。
</Note>

{/*AUTOGENERATED_START*/}

<div id="fuzzBits">
  ## fuzzBits
</div>

導入バージョン: v20.5.0

入力文字列 `s` の各ビットを、ビットごとに確率 `p` で反転します。

**構文**

```sql theme={null}
fuzzBits(s, p)
```

**引数**

* `s` — [`String`](/ja/reference/data-types/string) または [`FixedString`](/ja/reference/data-types/fixedstring) に対してビットのファジングを実行する `String` または `FixedString`
* `p` — 各ビットを反転する確率を表す、`0.0` から `1.0` までの数値 [`Float*`](/ja/reference/data-types/float)

**戻り値**

`String` または [`FixedString`](/ja/reference/data-types/fixedstring) 型の、`s` と同じ型のファジング済み文字列を返します。[`String`](/ja/reference/data-types/string) または [`FixedString`](/ja/reference/data-types/fixedstring)

**例**

**使用例**

```sql title=Query theme={null}
SELECT fuzzBits(materialize('abacaba'), 0.1)
FROM numbers(3)
```

```response title=Response theme={null}
┌─fuzzBits(materialize('abacaba'), 0.1)─┐
│ abaaaja                               │
│ a*cjab+                               │
│ aeca2A                                │
└───────────────────────────────────────┘
```

<div id="rand">
  ## rand
</div>

導入バージョン: v1.1.0

一様分布に従うランダムな `UInt32` 値を返します。

システムから取得した初期状態を用いる線形合同法の擬似乱数生成器を使用しているため、見た目はランダムでも、真の乱数ではなく、初期状態がわかっている場合は予測される可能性があります。
真の乱数性が重要な用途では、システムレベルの呼び出しや外部ライブラリとの連携など、別の方法の使用を検討してください。

**構文**

```sql theme={null}
rand([x])
```

**別名**: `rand32`

**引数**

* `x` — 省略可能で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しを1つのクエリ内で複数回使用したときに、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination) を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

型 `UInt32` のランダムな数値を返します。[`UInt32`](/ja/reference/data-types/int-uint)

**例**

**使用例**

```sql title=Query theme={null}
SELECT rand();
```

```response title=Response theme={null}
1569354847
```

<div id="rand64">
  ## rand64
</div>

導入バージョン: v1.1.0

一様分布に従うランダムな `UInt64` 値を返します。

システムから取得した初期状態を用いる線形合同法の乱数生成器を使用します。つまり、見かけ上はランダムでも、真の乱数ではなく、初期状態がわかっていれば予測可能です。
真の乱数が重要な場合は、システムレベルの呼び出しや外部ライブラリとの統合など、別の方法の使用を検討してください。

**構文**

```sql theme={null}
rand64([x])
```

**引数**

* `x` — 任意で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しを1つのクエリ内で複数回使用したときに、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

一様分布に従うランダムな UInt64 の数値を返します。[`UInt64`](/ja/reference/data-types/int-uint)

**例**

**使用例**

```sql title=Query theme={null}
SELECT rand64();
```

```response title=Response theme={null}
15030268859237645412
```

<div id="randBernoulli">
  ## randBernoulli
</div>

導入バージョン: v22.10.0

[ベルヌーイ分布](https://en.wikipedia.org/wiki/Bernoulli_distribution) に従うランダムな Float64 値を返します。

**構文**

```sql theme={null}
randBernoulli(probability[, x])
```

**引数**

* `probability` — 成功確率。`0` から `1` の値で指定します。[`Float64`](/ja/reference/data-types/float)
* `x` — オプションで、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しをクエリ内で複数回使用した場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定されたベルヌーイ分布に従うランダムな Float64 の値を返します。[`UInt64`](/ja/reference/data-types/int-uint)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randBernoulli(.75) FROM numbers(5)
```

```response title=Response theme={null}
┌─randBernoulli(0.75)─┐
│                   1 │
│                   1 │
│                   0 │
│                   1 │
│                   1 │
└─────────────────────┘
```

<div id="randBinomial">
  ## randBinomial
</div>

導入バージョン: v22.10.0

[二項分布](https://en.wikipedia.org/wiki/Binomial_distribution)に従う Float64 型の乱数を返します。

**構文**

```sql theme={null}
randBinomial(experiments, probability[, x])
```

**引数**

* `experiments` — 試行回数 [`UInt64`](/ja/reference/data-types/int-uint)
* `probability` — 各試行における成功確率。`0` から `1` までの値 [`Float64`](/ja/reference/data-types/float)
* `x` — 任意で、無視されます。この引数の唯一の目的は、同じ関数呼び出しを1つのクエリ内で複数回使用する場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination) を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定された二項分布に従うランダムな Float64 の数値を返します。 [`UInt64`](/ja/reference/data-types/int-uint)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randBinomial(100, .75) FROM numbers(5)
```

```response title=Response theme={null}
┌─randBinomial(100, 0.75)─┐
│                      74 │
│                      78 │
│                      76 │
│                      77 │
│                      80 │
└─────────────────────────┘
```

<div id="randCanonical">
  ## randCanonical
</div>

導入バージョン: v22.11.0

`0` (以上) から `1` (未満) の範囲で一様分布に従うランダムな `Float64` 値を返します。

**構文**

```sql theme={null}
randCanonical([x])
```

**引数**

* `x` — 省略可能で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しを1つのクエリ内で複数回使用した際に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)が行われるのを防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

ランダムな Float64 値を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randCanonical();
```

```response title=Response theme={null}
0.345217890123456
```

<div id="randChiSquared">
  ## randChiSquared
</div>

導入バージョン: v22.10.0

[カイ二乗分布](https://en.wikipedia.org/wiki/Chi-squared_distribution)に従うランダムな Float64 値を返します。

**構文**

```sql theme={null}
randChiSquared(degree_of_freedom[, x])
```

**引数**

* `degree_of_freedom` — 自由度。[`Float64`](/ja/reference/data-types/float)
* `x` — 任意で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しをクエリ内で複数回使用する場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定されたカイ二乗分布に従う、ランダムな Float64 値を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randChiSquared(10) FROM numbers(5)
```

```response title=Response theme={null}
┌─randChiSquared(10)─┐
│ 10.015463656521543 │
│  9.621799919882768 │
│   2.71785015634699 │
│ 11.128188665931908 │
│  4.902063104425469 │
└────────────────────┘
```

<div id="randConstant">
  ## randConstant
</div>

導入バージョン: v1.1.0

現在のクエリ実行中、すべての行で同一の単一のランダム値を生成します。

この関数には、次の特徴があります。

* 1 回のクエリ内では、すべての行に対して同じランダム値を返します
* クエリの実行ごとに異なる値を生成します

データセット内のすべての行に対して、一貫したランダムシードや識別子を適用する場合に役立ちます

**構文**

```sql theme={null}
randConstant([x])
```

**引数**

* `x` — 省略可能で、無視されます。この引数の唯一の目的は、同じ関数呼び出しが1つのクエリ内で複数回使われる場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

各行に同じランダム値を含む、型 `UInt32` のカラムを返します。[`UInt32`](/ja/reference/data-types/int-uint)

**例**

**基本的な使い方**

```sql title=Query theme={null}
SELECT randConstant() AS random_value;
```

```response title=Response theme={null}
| random_value |
|--------------|
| 1234567890   |
```

**パラメータ付きの使用方法**

```sql title=Query theme={null}
SELECT randConstant(10) AS random_value;
```

```response title=Response theme={null}
| random_value |
|--------------|
| 9876543210   |
```

<div id="randExponential">
  ## randExponential
</div>

導入バージョン: v22.10.0

[指数分布](https://en.wikipedia.org/wiki/Exponential_distribution)に従う、ランダムな Float64 型の値を返します。

**構文**

```sql theme={null}
randExponential(lambda[, x])
```

**引数**

* `lambda` — 分布の率パラメータ、またはラムダ値。[`Float64`](/ja/reference/data-types/float)
* `x` — 任意で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しを1つのクエリ内で複数回使用する場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination) を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定された指数分布に従うランダムな Float64 値を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randExponential(1/10) FROM numbers(5)
```

```response title=Response theme={null}
┌─randExponential(divide(1, 10))─┐
│              44.71628934340778 │
│              4.211013337903262 │
│             10.809402553207766 │
│              15.63959406553284 │
│             1.8148392319860158 │
└────────────────────────────────┘
```

<div id="randFisherF">
  ## randFisherF
</div>

導入バージョン: v22.10.0

[F分布](https://en.wikipedia.org/wiki/F-distribution)に従うランダムな Float64 値を返します。

**構文**

```sql theme={null}
randFisherF(d1, d2[, x])
```

**引数**

* `d1` — `X = (S1 / d1) / (S2 / d2)` における d1 の自由度。[`Float64`](/ja/reference/data-types/float)
* `d2` — `X = (S1 / d1) / (S2 / d2)` における d2 の自由度。[`Float64`](/ja/reference/data-types/float)
* `x` — 任意で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しを1つのクエリ内で複数回使用する場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination) を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定された F 分布に従うランダムな Float64 の値を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randFisherF(10, 3) FROM numbers(5)
```

```response title=Response theme={null}
┌─randFisherF(10, 20)─┐
│  0.7204609609506184 │
│  0.9926258472572916 │
│  1.4010752726735863 │
│ 0.34928401507025556 │
│  1.8216216009473598 │
└─────────────────────┘
```

<div id="randLogNormal">
  ## randLogNormal
</div>

導入バージョン: v22.10.0

[対数正規分布](https://en.wikipedia.org/wiki/Log-normal_distribution) に従う、ランダムな Float64 値を返します。

**構文**

```sql theme={null}
randLogNormal(mean, stddev[, x])
```

**引数**

* `mean` — 分布の平均値。[`Float64`](/ja/reference/data-types/float)
* `stddev` — 分布の標準偏差。[`Float64`](/ja/reference/data-types/float)
* `x` — 任意指定で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しが1つのクエリ内で複数回使われる場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定された対数正規分布に従うランダムな Float64 値を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randLogNormal(100, 5) FROM numbers(5)
```

```response title=Response theme={null}
┌─randLogNormal(100, 5)─┐
│  1.295699673937363e48 │
│  9.719869109186684e39 │
│  6.110868203189557e42 │
│  9.912675872925529e39 │
│ 2.3564708490552458e42 │
└───────────────────────┘
```

<div id="randNegativeBinomial">
  ## randNegativeBinomial
</div>

導入バージョン: v22.10.0

[負の二項分布](https://en.wikipedia.org/wiki/Negative_binomial_distribution)に従うランダムな Float64 値を返します。

**構文**

```sql theme={null}
randNegativeBinomial(experiments, probability[, x])
```

**引数**

* `experiments` — 実験の回数。[`UInt64`](/ja/reference/data-types/int-uint)
* `probability` — `各実験における失敗確率。`0`から`1`までの値。 [`Float64\`]\(/reference/data-types/float)
* `x` — 任意で、無視されます。この引数の唯一の目的は、同じ関数呼び出しが1つのクエリ内で複数回使われる場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定された負の二項分布に従うランダムな Float64 の数値を返します [`UInt64`](/ja/reference/data-types/int-uint)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randNegativeBinomial(100, .75) FROM numbers(5)
```

```response title=Response theme={null}
┌─randNegativeBinomial(100, 0.75)─┐
│                              33 │
│                              32 │
│                              39 │
│                              40 │
│                              50 │
└─────────────────────────────────┘
```

<div id="randNormal">
  ## randNormal
</div>

導入バージョン: v22.10.0

[正規分布](https://en.wikipedia.org/wiki/Normal_distribution)から生成されたランダムな Float64 値を返します。

**構文**

```sql theme={null}
randNormal(mean, stddev[, x])
```

**引数**

* `mean` — 分布の平均値。[`Float64`](/ja/reference/data-types/float)
* `stddev` — 分布の標準偏差。[`Float64`](/ja/reference/data-types/float)
* `x` — 省略可能で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しを 1 つのクエリ内で複数回使用した場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)が行われないようにすることです。[`Any`](/ja/reference/data-types)

**戻り値**

指定した正規分布に従うランダムな Float64 の値を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randNormal(10, 2) FROM numbers(5)
```

```response title=Response theme={null}
┌──randNormal(10, 2)─┐
│ 13.389228911709653 │
│  8.622949707401295 │
│ 10.801887062682981 │
│ 4.5220192605895315 │
│ 10.901239123982567 │
└────────────────────┘
```

<div id="randPoisson">
  ## randPoisson
</div>

導入バージョン: v22.10.0

[ポアソン分布](https://en.wikipedia.org/wiki/Poisson_distribution)に従うランダムな Float64 型の値を返します。

**構文**

```sql theme={null}
randPoisson(n[, x])
```

**引数**

* `n` — 平均出現回数。[`UInt64`](/ja/reference/data-types/int-uint)
* `x` — 任意で、無視されます。この引数の唯一の目的は、同じ関数呼び出しが1つのクエリ内で複数回使われる場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定されたポアソン分布に従う、ランダムな Float64 値を返します。[`UInt64`](/ja/reference/data-types/int-uint)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randPoisson(10) FROM numbers(5)
```

```response title=Response theme={null}
┌─randPoisson(10)─┐
│               8 │
│               8 │
│               7 │
│              10 │
│               6 │
└─────────────────┘
```

<div id="randStudentT">
  ## randStudentT
</div>

導入バージョン: v22.10.0

[スチューデントのt分布](https://en.wikipedia.org/wiki/Student%27s_t-distribution)に従う、ランダムな Float64 型の数値を返します。

**構文**

```sql theme={null}
randStudentT(degree_of_freedom[, x])
```

**引数**

* `degree_of_freedom` — 自由度。[`Float64`](/ja/reference/data-types/float)
* `x` — 省略可能で、無視されます。この引数の唯一の目的は、同じ関数呼び出しを1つのクエリ内で複数回使用した場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)が行われるのを防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

指定されたスチューデントの t 分布に従うランダムな Float64 値を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randStudentT(10) FROM numbers(5)
```

```response title=Response theme={null}
┌─────randStudentT(10)─┐
│   1.2217309938538725 │
│   1.7941971681200541 │
│ -0.28192176076784664 │
│   0.2508897721303792 │
│  -2.7858432909761186 │
└──────────────────────┘
```

<div id="randUniform">
  ## randUniform
</div>

導入バージョン: v22.10.0

区間 $[\min, \max]$ に一様に分布するランダムな Float64 値を返します。

**構文**

```sql theme={null}
randUniform(min, max[, x])
```

**引数**

* `min` — 範囲の左端 (含む) 。[`Float64`](/ja/reference/data-types/float)
* `max` — 範囲の右端 (含む) 。[`Float64`](/ja/reference/data-types/float)
* `x` — 省略可能で、無視されます。この引数の唯一の目的は、同じ関数呼び出しが1つのクエリ内で複数回使われる場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

`min` と `max` で定まる区間から一様に抽出された乱数を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randUniform(5.5, 10) FROM numbers(5)
```

```response title=Response theme={null}
┌─randUniform(5.5, 10)─┐
│    8.094978491443102 │
│   7.3181248914450885 │
│    7.177741903868262 │
│    6.483347380953762 │
│    6.122286382885112 │
└──────────────────────┘
```

<div id="randomFixedString">
  ## randomFixedString
</div>

導入バージョン: v20.5.0

指定した文字数の固定長のランダム文字列を生成します。
返される文字は必ずしも ASCII 文字とは限らず、表示可能文字でない場合があります。

**構文**

```sql theme={null}
randomFixedString(length)
```

**引数**

* `length` — 文字列の長さ (バイト単位) 。[`UInt*`](/ja/reference/data-types/int-uint)

**戻り値**

ランダムなバイトで構成される文字列を返します。[`FixedString`](/ja/reference/data-types/fixedstring)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randomFixedString(13) AS rnd, toTypeName(rnd)
```

```response title=Response theme={null}
┌─rnd──────┬─toTypeName(randomFixedString(13))─┐
│ j▒h㋖HɨZ'▒ │ FixedString(13)                 │
└──────────┴───────────────────────────────────┘
```

<div id="randomPrintableASCII">
  ## randomPrintableASCII
</div>

導入バージョン: v20.1.0

指定した文字数のランダムな[ASCII](https://en.wikipedia.org/wiki/ASCII#Printable_characters)文字列を生成します。

`length < 0` を指定した場合、この関数の動作は未定義です。

**構文**

```sql theme={null}
randomPrintableASCII(length[, x])
```

**引数**

* `length` — バイト単位の文字列長。 [`(U)Int*`](/ja/reference/data-types/int-uint)
* `x` — 省略可能で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しが1つのクエリ内で複数回使われる場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)を防ぐことです。 [`Any`](/ja/reference/data-types)

**戻り値**

ASCII の表示可能文字をランダムに組み合わせた文字列を返します。 [`String`](/ja/reference/data-types/string)

**例**

**使用例**

```sql title=Query theme={null}
SELECT number, randomPrintableASCII(30) AS str, length(str) FROM system.numbers LIMIT 3
```

```response title=Response theme={null}
┌─number─┬─str────────────────────────────┬─length(randomPrintableASCII(30))─┐
│      0 │ SuiCOSTvC0csfABSw=UcSzp2.`rv8x │                               30 │
│      1 │ 1Ag NlJ &RCN:*>HVPG;PE-nO"SUFD │                               30 │
│      2 │ /"+<"with:=LjJ Vm!c&hI*m#XTfzz │                               30 │
└────────┴────────────────────────────────┴──────────────────────────────────┘
```

<div id="randomString">
  ## randomString
</div>

導入バージョン: v20.5.0

指定した文字数のランダムな文字列を生成します。
返される文字は必ずしも ASCII 文字とは限らないため、表示できない場合があります。

**構文**

```sql theme={null}
randomString(length[, x])
```

**引数**

* `length` — 文字列の長さ (バイト単位) 。[`(U)Int*`](/ja/reference/data-types/int-uint)
* `x` — 省略可能で、値は無視されます。この引数の唯一の目的は、同じ関数呼び出しを1つのクエリ内で複数回使用した場合に、[共通部分式除去](/ja/reference/functions/regular-functions/overview#common-subexpression-elimination)が行われるのを防ぐことです。[`Any`](/ja/reference/data-types)

**戻り値**

ランダムなバイトで埋められた文字列を返します。[`String`](/ja/reference/data-types/string)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randomString(5) AS str FROM numbers(2)
```

```response title=Response theme={null}
���
�v6B�
```

<div id="randomStringUTF8">
  ## randomStringUTF8
</div>

導入バージョン: v20.5.0

指定した数のコードポイントを持つ、ランダムな[UTF-8](https://en.wikipedia.org/wiki/UTF-8)文字列を生成します。
未割り当ての[プレーン](https://en.wikipedia.org/wiki/Plane_\(Unicode\)) (プレーン4〜13) に属するコードポイントは返されません。
ただし、ClickHouse server とやり取りするクライアント側で、生成された UTF-8 文字列を正しく表示できない場合があります。

**構文**

```sql theme={null}
randomStringUTF8(length)
```

**引数**

* `length` — コードポイント単位での文字列の長さ。[`(U)Int*`](/ja/reference/data-types/int-uint)

**戻り値**

ランダムな UTF-8 コードポイントで構成される文字列を返します。[`String`](/ja/reference/data-types/string)

**例**

**使用例**

```sql title=Query theme={null}
SELECT randomStringUTF8(13)
```

```response title=Response theme={null}
┌─randomStringUTF8(13)─┐
│ 𘤗𙉝д兠庇󡅴󱱎󦐪􂕌𔊹𓰛       │
└──────────────────────┘
```
