9951 explained code solutions for 126 technologies


clickhouseHow to split a string


SELECT splitByString(' ', 'Hello all of you')ctrl + c
splitByString

will split given string (second argument) by a specified substring (first argument)

' '

string to split by (space)

'Hello all of you'

sample string to split


Usage example

SELECT splitByString(' ', 'Hello all of you')
output
┌─splitByString(' ', 'Hello all of you')─┐
│ ['Hello','all','of','you']             │
└────────────────────────────────────────┘