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 -

java - Play! framework 2.0: How to display multiple image? -

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