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

# repeat

> Returns a string repeated a specified number of times.

This function repeats `str` by a number of times according to `count`. When `count` is below 1, it returns an empty string. When `str` or `count` is NULL, it returns NULL.

## Syntax

```Haskell theme={null}
VARCHAR repeat(VARCHAR str, INT count)
```

## Examples

```Plain Text theme={null}
MySQL > SELECT repeat("a", 3);
+----------------+
| repeat('a', 3) |
+----------------+
| aaa            |
+----------------+

MySQL > SELECT repeat("a", -1);
+-----------------+
| repeat('a', -1) |
+-----------------+
|                 |
+-----------------+
```

## keyword

REPEAT,


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