-
concat()语法:
CONCAT ( str1 , str2 , … )
返回结果:
-
返回结果为连接参数产生的字符串
-
如有任何一个参数为NULL ,则返回值为 NULL
1、如图,现在需将password字段开头批量增加一位
2、使用代码:
update user_table set password = CONCAT('1', password) WHERE password LIKE '12345%'
3、运行成功,查看结果
功能拓展
-
字符串前后拼接【无限添加】
-
concat(‘a’ ,‘password’ ,‘b’ ,‘c’,*args )