+ -
当前位置:首页 → 问答吧 → oracle查询非数字开头的值

oracle查询非数字开头的值

时间:2011-12-09

来源:互联网

select * from tab
where trn1 not like '[0-9]%'这样在SqlServer下可以查询,但是oracle下就不起作用了,请大侠指点

作者: vhin2011   发布时间: 2011-12-09

select regexp_substr(trnl,'[^[0-9]]+')from tab

作者: dws2004   发布时间: 2011-12-09

select 1 from dual where regexp_like('adfasd1111', '^[^0-9]+');
select 1 from dual where regexp_like('222adfasd[code=SQL][/code]1111', '^[^0-9]+');

作者: yixilan   发布时间: 2011-12-09

[^[0-9]]+
 oracle会有一定的变化,^开头,+设置后面的字符数量

作者: xiedi1209   发布时间: 2011-12-09

select * from table where substr(col,1,1) not between '0' and '9'

作者: minitoy   发布时间: 2011-12-09