-
-
Save jsntn/5db8d237cb57a0098414 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 用来复制字符串,如下'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