9951 explained code solutions for 126 technologies


clickhouseHow to replace substrings


SELECT replaceAll('Thos os odeal', 'o', 'i')ctrl + c
replaceAll

replaces all found substrings to new one

'Thos os odeal'

string to search and replace in

'o'

match this substring

'i'

replace to this substring


Usage example

SELECT replaceAll('Thos os odeal', 'o', 'i')
output
┌─replaceAll('Thos os odeal', 'o', 'i')─┐
│ This is ideal                         │
└───────────────────────────────────────┘