mysql更新移除逗号分割字符串中部分字符

moonjerx
2021-10-21 / 0 评论 / 111 阅读 / 正在检测是否收录...
    UPDATE t_robot_team
    SET chat_words = TRIM(BOTH ',' FROM REPLACE( CONCAT( ',', chat_words, ',' ), CONCAT( ',', 21, ',' ), ',' ))
    WHERE 
    locate(CONCAT(',',21,','),CONCAT(',',chat_words,','));
0

评论 (0)

取消

您的IP: