Let's say I have a table shortText
:
ID | SHORT_TEXT
------+---------------------------
001 | The elephants went in two by two
002 | Needles and haystack
003 | Somewhere over the rainbow
...
How to query shortText
to Count the occurence of each word in column SHORT_TEXT
(without using a stored procedure) to get a result like
WORD | OCCURENCE
------+------------
the | 2
and | 1
over | 1
...
Edit:
There is no general answer (variable number of words without a given maximum) provided so far in SO.