ID EN
String Functions and Operators

REPEAT(str,count)

MySQL 8.4

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 is NULL.

Syntax

MYSQL
SELECT REPEAT('MySQL', 3);
'MySQLMySQLMySQL'

Examples

Example
MYSQL
SELECT REPEAT('MySQL', 3);
'MySQLMySQLMySQL'