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

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -