MySQL中字符串和数字拼接

select * from qa_employ where EMPLOY_GROUP =2sql

原先雇佣表中全部雇佣姓名所有是"张三",spa

但愿将雇用姓名变得不同,好比张三+idcode

SQLserver中直接用server

 

update   qa_employ
set EMPLOY_NAME = EMPLOY_NAME+EMPLOY_id
where EMPLOY_ID > 10blog

即便发现EMPLOY_id是int类型,最多用cast转一下开发

 

update   qa_employ
set EMPLOY_NAME = EMPLOY_NAME+cast (EMPLOY_id as char)
where EMPLOY_ID > 10ast

但在mySQL报错class

 1292 - Truncated incorrect DOUBLE valuedate

 

update qa_employ
set EMPLOY_NAME = concat("开发人员",EMPLOY_id)
where EMPLOY_ID > 10select

 

update qa_employ set EMPLOY_NAME = concat("开发人员",EMPLOY_id) where EMPLOY_ID > 10 
UPDATE QA_BUGLIST SET BUG_TASK_NUM = CASE (BUG_ID %13) WHEN 0 THEN 'TASK#201913' ELSE CONCAT('TASK#1110',BUG_ID %13) END 
相关文章
相关标签/搜索