mysql中concat()这个函数看了下 感觉例子都说的不是很清楚
想请教下。给个实例越简单越好
想请教下。给个实例越简单越好
解决方案 »
- 急!使用auto_increment产生间隙!
- MySql安装时的不能启动服务的问题的解决
- 普通用户无法启动mysql
- 问个基础问题,sql文件是不是数据库
- 这个Sql语句怎么写?
- error 2003:Can't connect to MySQL server on 'localhost'(10061)????
- 关于用户留存的问题
- 求助怎么取两个关联表中的自增长字段赋值到存储过程中给第三个表批量添加数据
- 我想向大数据方向发展 现在培训啥好 Linux OR Mysql OR Other
- MySQL优化问题
- mysqldump文件出错了!
- 在mysql下边foreign key只能作为表级约束而不能是列级约束吗?
EG:
select concat('c','s','d','n');
返回结果为:
concat('c','s','d','n')
csdnMySQL的concat函数在连接字符串的时候,只要其中一个是NULL,那么将返回NULL
EG:
select concat('c','s','d','n',null);返回结果为:
concat('c','s','d','n',null)
NULL
CONCAT(str1,str2,...)Returns the string that results from concatenating the arguments. May have one or more arguments. If all arguments are nonbinary strings, the result is a nonbinary string. If the arguments include any binary strings, the result is a binary string. A numeric argument is converted to its equivalent binary string form; if you want to avoid that, you can use an explicit type cast, as in this example:SELECT CONCAT(CAST(int_col AS CHAR), char_col);CONCAT() returns NULL if any argument is NULL.