-
-
Save jsntn/548f82a1c7b43cf1a554 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
mysql> select concat('10'); | |
+--------------+ | |
| concat('10') | | |
+--------------+ | |
| 10 | | |
+--------------+ | |
1 row in set (0.00 sec) | |
mysql> select concat('11','22','33'); | |
+------------------------+ | |
| concat('11','22','33') | | |
+------------------------+ | |
| 112233 | | |
+------------------------+ | |
1 row in set (0.00 sec) | |
/* MySQL的concat函数在连接字符串的时候,只要其中一个是NULL,那么将返回NULL */ | |
mysql> select concat('11','22',null); | |
+------------------------+ | |
| concat('11','22',null) | | |
+------------------------+ | |
| NULL | | |
+------------------------+ | |
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