REPEAT()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns a string repeated the specified number of times.
USAGE
REPEAT(string, count)
Argument Name | Description |
|---|---|
| The string to repeat |
| The number of repeats |
DETAILS
REPEAT() is a string function that returns a string consisting of the string argument repeated count times.
An empty string is returned if count is less than 1.
A NULL is returned if any argument is NULL.
EXAMPLES
SELECT REPEAT('Sql', 3);
+------------------+
| REPEAT('Sql', 3) |
+------------------+
| SqlSqlSql |
+------------------+
SELECT QUOTE(REPEAT('Sql', 0));
+-------------------------+
| QUOTE(REPEAT('Sql', 0)) |
+-------------------------+
| '' |
+-------------------------+
