mysql the repeat () function

To copy the string, as 'ab' represents a string to be copied, the copied parts 2 represents

mysql> select repeat('ab',2);

+----------------+
| repeat('ab',2) |
+----------------+
| abab           |
+----------------+

1 row in set (0.00 sec)

Another example

mysql> select repeat('a',2);
+---------------+
| repeat('a',2) |
+---------------+
| aa            |
+---------------+
1 row in set (0.00 sec)

Guess you like

Origin www.cnblogs.com/jichi/p/11622079.html