update episode set screen_shot = REPLACE(screen_shot, screen_shot, concat(screen_shot,'.jpg')) where INSTR(screen_shot,'jpg')<=0;
将episode表中所有没有包含'.jpg'后缀的screen_shot字段添加jpg后缀, 这样可以省去写脚本来批量实现
本文介绍了一种通过SQL更新语句批量为数据库表中缺失.jpg后缀的screen_shot字段添加'.jpg'的方法,避免了手动编写脚本进行逐条处理的繁琐过程。
update episode set screen_shot = REPLACE(screen_shot, screen_shot, concat(screen_shot,'.jpg')) where INSTR(screen_shot,'jpg')<=0;
将episode表中所有没有包含'.jpg'后缀的screen_shot字段添加jpg后缀, 这样可以省去写脚本来批量实现

被折叠的 条评论
为什么被折叠?