I got a customers
table with this column: hashtag VARCHAR(255)
, that contains lowercase words separated by white spaces.
We added a new table:
hashtag ( id INT, tag VARCHAR(255) )
I need to take each customer's hashtag string, split it, and insert it in the hashtag table if it doesn't exists.
I'd really prefer to do everything SQL only and write php if it's inevitable.
Does MySQL permit to split a string column at each occurrence of a certain char and use the resulting words to execute an insert?