Description
The REPEAT( ) function repeats a string in a specified number of times.
This function has the form:
SELECT REPEAT(str, count)
Parameter | Description |
---|---|
str | A string |
count | Specified number to repeat a string |
Return Value
A string in a specified number of times.
Examples
The following example shows the basic use of this function:
mysql> SELECT REPEAT('MySQL', 3);
-> 'MySQLMySQLMySQL'