I need to do a find a replace but rather than find one word to replace with another I have about 16k words, so as an example; table 1 has two words apple,orange - table 2 has the contents of a book, i want to be able to replace all the words apple and orange that exists in table 2 and replace them with ##, is there a query that does this ? my actual table 1 has about 16k words and table 2 has 8 million words. most of the examples on google suggests i type the words to find but that is not possible when i have 16k words I am using mysql workbench and an absolute beginner
(from comment) table 1 has 16k names in a column - table 2 has emails and text in columns - i want to be able to censor out all the names in table 2 using the names in table one as a reference
SELECT
query, you will obtain ALL matched pairs, but if you try to replace inUPDATE
query using those pairs each prase will be updated only once, one word replacing will be performed only. Resume - you need to iterate over words list and to replace each word separately. It can be performed in stored procedure only. – Akina Dec 17 '18 at 7:33