I have records like:
abc -books
acc -papers
now what I wanted to to is to update the first three (3) characters into:
xxx -books
xxx -papers
without doing anything after the dash (-) or leave the 'book' and 'paper'
I tried to do this way but I got error message:
MYSQL
ERROR:
abc -books
acc -papers
now what I wanted to to is to update the first three (3) characters into:
xxx -books
xxx -papers
without doing anything after the dash (-) or leave the 'book' and 'paper'
I tried to do this way but I got error message:
MYSQL
update table1 set LEFT(name,3)='x xx-';
Code:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT(name,3)='xxx-' where name in ('books','pens')'' at line 1
Comment