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

> Reference material for REPEAT function

# REPEAT

Returns a string formed by repeating the input string a specified number of times.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
REPEAT(<string>, <n>)
```

## Parameters

| Parameter  | Description                               | Supported input types |
| :--------- | :---------------------------------------- | :-------------------- |
| `<string>` | The string to repeat.                     | `TEXT`                |
| `<n>`      | The number of times to repeat the string. | `INTEGER`, `BIGINT`   |

## Return Type

`TEXT`

## Remarks

* If `<n>` is `0` or negative, an empty string is returned.
* If either argument is `NULL`, `NULL` is returned.
* `REPEAT` supports multi-byte UTF-8 characters.

## Example

The following example repeats the string `'Firebolt'` three times:

<div className="query-window">
  ```
  SELECT REPEAT('Firebolt', 3) AS result;
  ```

  | result <span>text</span> |
  | :----------------------- |
  | FireboltFireboltFirebolt |

  <p><span>Rows: 1</span><span>Execution time: 3.04ms</span></p>
</div>

The following example shows that a non-positive count returns an empty string:

<div className="query-window">
  ```
  SELECT REPEAT('abc', 0) AS result;
  ```

  | result <span>text</span> |
  | :----------------------- |
  |                          |

  <p><span>Rows: 1</span><span>Execution time: 2.40ms</span></p>
</div>
