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
  • 30,962
  • 25
  • 85
  • 135
Lucky13
  • 11,393
  • 7
  • 25
  • 36
  • 1
    Does this answer your question? [Replace all fields in MySQL](https://stackoverflow.com/questions/3145076/replace-all-fields-in-mysql) – Nova Dec 12 '19 at 02:29

1 Answers1

2
UPDATE my_Table set keyword = REPLACE(keyword, "-", "_");
Maude
  • 512
  • 3
  • 8
  • 23