# REPEAT Function

## Syntax

```sql
REPEAT(str,count)
```

## Description

Returns a string consisting of the string `str` repeated `count` times. If`count` is less than 1, returns an empty string. Returns NULL if `str` or`count` are `NULL`.

## Examples

```sql
SELECT QUOTE(REPEAT('MariaDB ',4));
+------------------------------------+
| QUOTE(REPEAT('MariaDB ',4))        |
+------------------------------------+
| 'MariaDB MariaDB MariaDB MariaDB ' |
+------------------------------------+
```

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}
