Skip to content

Instantly share code, notes, and snippets.

@jsntn jsntn/MySQL_repeat.sql Secret

Created May 8, 2014
Embed
What would you like to do?
-- 用来复制字符串,如下'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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.