美文网首页我爱编程
MySQL select replace

MySQL select replace

作者: 杰哥长得帅 | 来源:发表于2018-04-12 18:15 被阅读23次

需求:将图片的http://全部改成https://

方法:

select replace(cover, 'http://', 'https://') from tbl_game

可以得到将http://改成https://之后的字符串

于是update tbl_game SET cover = replace(cover, 'http://', 'https://')即可

相关文章

网友评论

    本文标题:MySQL select replace

    本文链接:https://www.haomeiwen.com/subject/wmefkftx.html