0

I have a quite large table and wanted to update all - with _ in one particular field values.

Eg: Field name is keyword

The current value is "supercomputing-asia-conference" and the expected result would be supercomputing_asia_conference

I don't need to retrieve the data, I just wanted to update the value when executing the SQL query. I'm trying to write an SQL query to do this, can someone help?

Dharman
  • 26,923
  • 21
  • 73
  • 125
Lucky13
  • 11,155
  • 7
  • 23
  • 36
  • 1
    Does this answer your question? [Replace all fields in MySQL](https://stackoverflow.com/questions/3145076/replace-all-fields-in-mysql) – Cheng Hui Yuan Dec 12 '19 at 02:29

1 Answers1

2
UPDATE my_Table set keyword = REPLACE(keyword, "-", "_");
Maude
  • 392
  • 3
  • 7
  • 21