开发者

Use Trim on all records in a mysql table

Is this possible in phpMyAdmin, to execute that query on all records within a table (to get rid of any开发者_如何学运维 whitespace)


You may have to list the field name but you'd only need to do so once per field.

UPDATE 'table_name' SET 'field_name' = TRIM('field_name')

(I would advise testing this before running it on your live data)


Try to cheat:

update venues set postcode=TRIM(postcode)+''
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜