hey guys
i need to add a special text to all rows in my mysql table , how to add some text to the end of all rows' content in a table just for one field
i used this code :
UPDATE `blogs` SET `title`= `title` + 'mytext';
but didnt work for me
hey guys
i need to add a special text to all rows in my mysql table , how to add some text to the end of all rows' content in a table just for one field
i used this code :
UPDATE `blogs` SET `title`= `title` + 'mytext';
but didnt work for me
MySQL does not have a string concatenation operator (+
). You have to use the concat() function, as Daniel Schneller pointed out in the other answer.
If you try SELECT '1' + '2';
in MySQL, it would return 3
. The +
operator is simply an addition operator. Your query would have updated the title field with a 0
.