简体   繁体   中英

Can I use * to select all fields in a MySQL table to find and replace a string?

I need to replace a string within a specific MySQL table using phpmyadmin, but I don't know in which filed the string will be, as the value can be in different fields in the same table. (I know...) The database I'm working with was poorly built... Can I use the query below?

update table_name set * = replace(*, 'original text', 'replacement text');

我将下载sql dump,在带有搜索和替换功能(崇高文本CTRL + SHIFT + F)的文本编辑器中打开,保存,然后导入并测试。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM