sql批量给一个字段字符结尾加上字符
时间:2024年03月01日
/来源:网络
/编辑:佚名
sql批量给一个字段字符结尾加上字符命令
update table(表名) set filename=concat(filename,'/');
filename 字段名称
/ 是给filename 这个结尾加上一个斜杠。
update [表名] set 字段名 = replace(字段名,'原本内容','想要替换成什么')
update test_tb set address=replace(address,'东','西') where id=2
把address 字段里面的 "东" 替换成 “西”
update test_tb set titleurl=replace(titleurl,'html/','html')
把address 字段里面的 "html/" 替换成 “html”
update table(表名) set filename=concat(filename,'/');
filename 字段名称
/ 是给filename 这个结尾加上一个斜杠。
update [表名] set 字段名 = replace(字段名,'原本内容','想要替换成什么')
update test_tb set address=replace(address,'东','西') where id=2
把address 字段里面的 "东" 替换成 “西”
update test_tb set titleurl=replace(titleurl,'html/','html')
把address 字段里面的 "html/" 替换成 “html”
新闻资讯 更多
- 【mysql教程】mysql出现提示Table is marked as crashed and should be repaired 解决办法04-02
- 【mysql教程】 mysql实现不存在就Insert into存在则update举例03-30
- 【mysql教程】INSERT 表名(字段) VALUES(字段值) ON DUPLICATE KEY UPDATE 条件语句实例03-30
- 【mysql教程】sql中ON DUPLICATE KEY UPDATE有什么用?03-30
- 【mysql教程】mysql实现不存在就 Insert into 存在则 update03-30
- 【mysql教程】MySQL 当记录不存在时insert,当记录存在时update03-30
- 【mysql教程】将INSERT INTO转换为UPDATE03-30
- 【mysql教程】sql技术 --insert 变 update03-30
猜你需要