mysql 复杂替换 语句遇到问题,求大佬帮助
替换的字段的内容:[{"remake":"","source":"woku","url_type":"1"},{"remake":"22","source":"baiduyun","url_type":"2"},{"remake":"test001","source":"aliyun","url_type":"3"},{"remake":"","source":"guanfang","url_type":"4"},{"remake":"155","source":"kuaibo","url_type":"5"}]
我现在需要把 url_type:3 的 remake的值设置为空的字符,其他内容不变 ,但是remake的值可能是 test001 或者其他的任意字符
update vip_video_detail as t set t.v_remake=REPLACE(t.v_remake,'{"remake":"加个通配符","source":"aliyun","url_type":"3"}','{"remake":"","source":"aliyun","url_type":"3"}') whereid= 38533
这是我能想到的sql语句,但是这个 加个通配符但是 通配符不知道怎么加,
有sql 牛逼大佬们知道怎么加 或者 有好sql 修改??
页:
[1]