Replace all fields in MySQL

前端 未结 4 1899
情歌与酒
情歌与酒 2020-11-30 11:30

I need to replace some chars in the columns of a table, by using the REPLACE command.
I know that the REPLACE command needs a column name, t

4条回答
  •  Happy的楠姐
    2020-11-30 11:59

    You can't do what you want. If it was me, i'd take a list of column names and in my editor do a quick regex search and replace.

    Find: (.+)

    Replace: UPDATE my_table SET \1 = REPLACE (\1,'a','e' );

提交回复
热议问题