mysql的repeat()函数

用来复制字符串,如下'ab'表示要复制的字符串,2表示复制的份数

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

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

1 row in set (0.00 sec)

又如

mysql> select repeat('a',2);
+---------------+
| repeat('a',2) |
+---------------+
| aa            |
+---------------+
1 row in set (0.00 sec)
posted @ 2019-10-04 14:25  经典鸡翅  阅读(5572)  评论(0编辑  收藏  举报