replace function-replaces a string

If you want to replace the string, use the replace function. The return value is the replaced string.

replace (target character string, character string to be replaced, character string after replacement)

This is a SQL sample for changing hyphens to underscores with the replace function.

update book set code = replace (code, "-", "_") where id = 1;

Associated Information