oracle并没有给我们提供这样一个现成的函数:
可行的做法:
方法1 使用trim+translate函数:
select * from 表 where trim(translate(字段,'0123456789',' ')) is not NULL;
方法2 使用regexp_like函数:
select * from 表 where not regexp_like(字段,'^\+?[1-9][0-9]*$');
方法23 使用regexp_replace函数:
select count(1) from ns_organization where regexp_replace(deptcode,’\d’,”) is not null;
以上代码是取出非正整数数据,相反则去掉‘not’即可;