I am really new to mysql and might need your help. I have a a table called localgames
and I am trying to replace some values to clean the table so here is the doubt and what I have tried and the proposed "solution":
To replace a simple entry that was easy, I used:
UPDATE localgames
SET Stock = REPLACE(Stock, '0 in stock', 'Sold out');
So all 0 in stock
entries in the column Stock where replaced by Sold out
. Cool.
However now I have another entries for example 1 in stock
, 2 in stock
, 3 in stock
and more 100 of XX in stock
and I want to replace them all for In stock
.
Is there a way to use something like SET Stock = REPLACE(Stock, '*.* in stock', 'In Stock');
?