mysql updates a field = this field + string

When we use + splicing to execute sql statements like in c#, it is as follows:

UPDATE abpusers set UserName='qy'+UserName+'' where  UserName='qy-wh'

The following error will occur:

Implemented through the concat function in mysql

UPDATE abpusers set UserName=CONCAT('qy_',UserName) where  UserName='qy-wh'

Guess you like

Origin blog.csdn.net/weixin_38225763/article/details/134974670