In my database there is a field in type VARCHAR (let’s name in field1), in some cases, I want to find special record and edit the value of field1, my query must be able to read the current value of field1 and add special string like “.a” at the end of it. I guess the query must be something like this:
UPDATE TableName SET field1 = CurrentValue +'a' WHERE field1 = CurrentValue ;
but its not complete, and there is error. Would you help me?!!
You are looking for
SET field1 = CONCAT(field1,'a')The procedure you said you got an error for works for me: