Created
June 21, 2024 17:18
-
-
Save eklect/8f598d2fb7c7225ebaf517507172e3b9 to your computer and use it in GitHub Desktop.
Mysql → Remove non-digit characters from string in select statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is for MySQL 8+ and MariaDB 10.0.5+ | |
select REGEXP_REPLACE(COLUMN_NAME_HERE,'\\D','') from TABLE_NAME_HERE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment