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

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

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -