I have custom table and there are special characters in this column. I want to remove the special characters and keep the space between the word.
I try this query.
select customer_ID, REGEXP_REPLACE(name, '[^0-9A-Za-z]', '') from customer
But this query removes all special characters and space.
How can I special characters and keep the space between the word in this column?
If you want to keep the whitespaces then you could add that to the negated character class.
To match the character class one or more times you could add the + sign after the character class.
Your query would look like:
select customer_ID, REGEXP_REPLACE(name, '[^0-9A-Za-z ]+', '') from customer