sql - Trim spaces from values in MySQL table -


i want update values in table trimming leading , trailing spaces. have tried following queries neither worked.

i know possible use trim select, how can use update?

updates teams set name = trim(name) updates teams set name = trim(leading ' ' trailing ' ' name) 

you not have select.

try -

update teams set name = trim(name) 1 = 1; 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -