How do I update/replace the value of the first table from the list of my second table in SQL. Sorry im not so good in using replace() of SQL especially replacing from values base from different table
First table.
ID | Value ====================== 1 | Fruits[Apple] 2 | Fruits[Apple,Mango] 3 | Apple[Red,Green]
Second table
Search | Replace ========================= Apple | Orange Green | Yellow
Best Answer
In Oracle SQL it goes like this :
But for this this to work properly, keep in mind that the attribute
Search
in theSECOND_TABLE
must be unique, otherswise you'll need to rearange your query.