Forums | Webyog
Tools to manage and monitor MySQL databases
forums › forums › SQLyog › Using SQLyog › delete n ammend data
im very new to this sglyog. I've created a table which have about 3k data. i hav mistakenly entered the wrong data ( eg: 12345-8), so i want to delete or ignore the '-' for my entire table, how do i do that?
UPDATE my_table SET my_field=INSERT(my_field, (INSTR(my_field, '-'), 1,'');
INSERT function will replace '-' character with '' (empty string) at its first occurance(INSTR locates the first occurance) in my_field.
If you want to replace more than one occurances of '-' character, then use REPLACE() function insted of INSERT().