用来复制字符串,如下'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)
评论(0)