sqlll
sqlll

Reputation: 25

SQL remove not alphabetic characters from string

I am a beginner in SQL I have a column with strings, I need to remove any character that is not between A-Z and a-z

Upvotes: 1

Views: 93

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1271161

You can use regexp_replace():

select regexp_replace(col, '[^a-zA-Z]', '', 'g')

Here is a db<>fiddle.

Upvotes: 1

Related Questions