I have a MySQL table and want to add 'x' to the beginning of a column value for every row.
My syntax guess was:
UPDATE table1 SET col5='x'.col5
This did not work. Any ideas?
I have a MySQL table and want to add 'x' to the beginning of a column value for every row.
My syntax guess was:
UPDATE table1 SET col5='x'.col5
This did not work. Any ideas?
update table1
set col5 = CONCAT('x', col5)
where col5 NOT LIKE 'x%'; -- optional, depending on circumstances
update table1 set col5 = 'x' + col5