跳转到内容

将子字符串的所有匹配项替换为另一个子字符串。

func.replace(<str>, <old>, <new>)
func.replace('hello world', 'world', 'there')
┌───────────────┐
│ 'hello there' │
└───────────────┘
REPLACE(<str>, <old>, <new>)
SELECT REPLACE('hello world', 'world', 'there');
┌─────────────┐
│ hello there │
└─────────────┘