MySQL UPDATE not working when text similar -
update: looks mysql ignores trailing space on query 'media services '
i have following code:
select * table company = 'media services '
this brings 132 rows (note space @ end of company name). need remove space, have tried using following code:
update table set company = 'media services' company = 'media services '
the output 0 rows affected
- trying understand why might be?
any ideas , suggestions don't want manually change 132 records.
not sure try using like
operator instead like
update table set company = 'media services' company 'media services%'
per latest comment, it's strong guess there no trailing spaces in company value as. it's when where company = 'media services '
; ignores trailing space , gives matched result.
so essentially, update never happens since there nothing update , update
says 0 rows affected
.
Comments
Post a Comment