Mysql REPEAT
From w3cyberlearnings
Contents |
MySQL REPEAT Function
This function returns a repeated string based on the count times.
Syntax REPEAT
- Str: String to be repeated
- COUNT: How many time to repeat
REPEAT(Str,COUNT);
Example 1
mysql> SELECT REPEAT('!',3); +---------------+ | REPEAT('!',3) | +---------------+ | !!! | +---------------+ 1 row in set (0.00 sec)
Example 2
mysql> SELECT REPEAT('-',14); +----------------+ | REPEAT('-',14) | +----------------+ | -------------- | +----------------+ 1 row in set (0.00 sec)