MySQL REPEAT() Function
Definition and Usage
The REPEAT() function repeats a string as many times as specified.
Syntax
REPEAT(string, number)
Parameter Values
Parameter | Description |
---|---|
string | Required. The string to repeat |
number | Required. The number of times to repeat the string |
Technical Details
Works in: | From MySQL 4.0 |
---|
More Examples
Example
Repeat the text in CustomerName 2 times:
SELECT REPEAT(CustomerName,
2)
FROM Customers;
Try it Yourself »
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.