先说结论:8.0版本之前不支持,只能采用曲线方法,例如:
UPDATE test set test.data=REPLACE (test.data,SUBSTR(test.data,LOCATE("{",test.data),LOCATE("}",test.data)),"")
8.0之后使用REGEXP_REPLACE 函数
UPDATE tableName set `name` = REGEXP_REPLACE(`name`, '<.*>', '') WHERE `name` REGEXP '<.*>';
参考文章:
https://blog.csdn.net/zhou120189162/article/details/90296983
https://cloud.tencent.com/developer/article/1835817
标签:set,name,REPLACE,正则,mysql,test,REGEXP,replace,data From: https://www.cnblogs.com/dirgo/p/17345834.html