> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# REPEAT

> Repeats a string a specified number of times.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

Returns NULL if either argument is NULL.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
repeat(value, count)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | STRING | Yes | The string to repeat. |
| count | INTEGER | Yes | The repetition count. |

## Returns

* Type: STRING
* Possible values: The concatenation of count copies; an empty string when count is zero or negative.
* NULL behavior: Returns NULL if either argument is NULL.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT repeat('ab', 3) AS repeated, repeat('ab', -1) AS negative;
```

| repeated | negative |
| - | - |
| ababab | '' |

### Repeat Unicode text

In the result table, `''` denotes an empty string.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT repeat('猫', 2) AS repeated, repeat('cat', 0) AS zero_repetitions;
```

| repeated | zero\_repetitions |
| - | - |
| 猫猫 | `''` |

## Limitations

* A result exceeding the string storage limit raises an execution error. Large requested values can require substantial memory.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.