jeudi 7 juillet 2016

error with the replace function in mysql


I have a problem with the replace function in mysql for example

set @str = "Category, CategoryName, CategoryID";
SELECT REPLACE (@str, "Category", "125");

I would replace only the first word "Category" and here's the result:

125,125Name, 125ID

how to fix the problem

thank you in advance


Aucun commentaire:

Enregistrer un commentaire