--结果为NULL则证明为数字 SELECT regexp_replace('-.1','-?[0-9]*(\.[0-9]+)?$','') FROM dual;--正常数字 SELECT regexp_replace('-.1E-3','-?[0-9]*(\.[0-9]+)?(E-?[0-9]+)?$','') FROM dual; --支持科学计数法 --常规用法: select 1 from dual where 1=1 and regexp_replace('-.1','-?[0-9]*(\.[0-9]+)?$','') is null; update table_a t set t.error_message = 'column_a不能转换为数字' where 1=1 and regexp_replace(t.column_a,'-?[0-9]*(\.[0-9]+)?$','') is not null;
Oracle regexp 验证数字
原创
©著作权归作者所有:来自51CTO博客作者baser的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:MAC登录EBS
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
C#-正则基础 [0-9][0-9] 匹配两个相邻的数字
.NET Framework : 4.7.2 IDE : Visual Studio Community 2019
c# microsoft github Express