开发者

Remove space and replace with _ in phpMyAdmin

开发者 https://www.devze.com 2023-04-11 15:35 出处:网络
Basically I want to take a row in a table which has entries \'example entry\' and tur开发者_如何学Cn them into \'example_entry\'. There are thousands of entries so I don\'t want to do it manually, obv

Basically I want to take a row in a table which has entries 'example entry' and tur开发者_如何学Cn them into 'example_entry'. There are thousands of entries so I don't want to do it manually, obviously. How would I do this?


Try this:

UPDATE your_table
SET your_field = REPLACE(your_field, ' ', '_')


Try with the following query:

UPDATE table SET field = REPLACE(field, ' ', '_');
0

精彩评论

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