暂记一下:
update hare t set t.haername = replace(t.haername,'委会','') where REGEXP_LIKE(t.haername,'*村委会$')
update hare t set t.haername = replace(t.haername,'*','') where t.haername like '*%'
update hare t set t.haername = replace(t.haername,'委会','') where REGEXP_LIKE(t.haername,'*村委会$')
update hare t set t.haername = replace(t.haername,'*','') where t.haername like '*%'
本文介绍了一种使用SQL进行字符串替换的方法,通过两个具体的更新语句示例,展示了如何去除字段中特定子串的过程。
3万+

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



