从mysql列中删除所有数字字符 [英] remove all numeric characters from column mysql

查看:156
本文介绍了从mysql列中删除所有数字字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个只能从字符串中删除数字字符的mysql函数。

I want to develop one mysql function that can remove only numeric characters from the string.

推荐答案

定义的函数,其中可以写你的替换逻辑,也可以尝试:

You can write a user defined function, where in you can write your logic of replacement or you can try :

Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(column,'9',''),'8',''),'7',''),'6',''),'5',''),'4',''),'3',''),'2',''),'1',''),'0','')

这篇关于从mysql列中删除所有数字字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆