select count(1)
into x_Nums
from dual
where regexp_replace(substr(x_OrainCode, -x_Flownum),'^[-\+]?\d+(\.\d+)?$','') is not null;
如果是0 那就是数字,不然那就是非数字
"该篇博客探讨了一个SQL查询,该查询使用`regexp_replace`和`substr`函数检查`x_OrainCode`字段的最后的`x_Flownum`位是否为数字。如果内容能通过正则表达式`'^[-+]?d+(.d+)?$'`的验证,即不返回空值,那么这部分内容就被认为是数字。"
select count(1)
into x_Nums
from dual
where regexp_replace(substr(x_OrainCode, -x_Flownum),'^[-\+]?\d+(\.\d+)?$','') is not null;
如果是0 那就是数字,不然那就是非数字

被折叠的 条评论
为什么被折叠?