对表uninoti_sms_template的temp_content字段,批量加上‘测试’标识
UPDATE uninoti_sms_template SET temp_content=CONCAT(temp_content,'测试');
批量修改表uninoti_sms_template的temp_content字段,‘测试’标识修改为‘【测试】’
UPDATE uninoti_sms_template SET temp_content = REPLACE(temp_content,'测试','【测试】');
Ps:注意REPLACE()方法在Mysql中会自动带出'REPLACE'(),带着‘’运行时会报错:
[SQL] UPDATE uninoti_sms_template SET temp_content = 'REPLACE'(temp_content,'测试','【测试】');
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(temp_content,'测试','【测试】')' at line 1
需要将replace方法的‘’去掉,运行才可成功。
至于原因暂时不知,有知道的人欢迎告知下~