求一oracle的正则表达式,在线等 本帖最后由 gbys 于 2012-03-07 15:36:07 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Select gonghaoFROM employeeWhere REGEXP_LIKE(gonghao, '^([a-z|0-9|A-Z]+)$') 或者给你的表加一个约束:alter table 你的表名 add constraint check_fr_gthr_cd check(regexp_replace(regexp_replace(要Check的列名, '\d'), '[A-Za-z]') is null); regexp_replace(REGEXP_LIKE(gonghao, '^([a-z|0-9|A-Z]+)$'),0) 按穷人大仙的理论这个应该就是了。!! select gonghao from employee gonghao --------------1 38742 adsf3 10014 10025 afd*%126 asd17 #24^&--查询包涵 除数字字母外的 其他字符的字段Select gonghaoFROM employeeWhere not REGEXP_LIKE(gonghao, '^([a-z|0-9|A-Z]+)$') gonghao --------------1 afd*%122 #24^& Select gonghaoFROM employeeWhere not REGEXP_LIKE(gonghao, '^([a-z|0-9|A-Z|-]+)$') orcale 用游标输出多行数据集(动态select语句)? 一个oracle问题 过程调用错误 内联接on后取的等式 分区表中能否使用序列 如何将某个目录下的所有图片批量导入oracle数据库中 急急急!跪求一个关于oracle的基础问题 oracle里的数据怎么导成为以TAB分隔列,回车分割行的txt文本啊? sql 我写了一个循环插入数据的sql,在sql server2k中可用,怎么使他在oracle中用? oracle如何快速创建用户、还原数据库 oracle怎么调用存储过程?在线等!!!
Select gonghao
FROM employee
Where REGEXP_LIKE(gonghao, '^([a-z|0-9|A-Z]+)$')
alter table 你的表名 add constraint check_fr_gthr_cd check
(regexp_replace(regexp_replace(要Check的列名, '\d'), '[A-Za-z]') is null);
select gonghao
from employee gonghao
--------------
1 3874
2 adsf
3 1001
4 1002
5 afd*%12
6 asd1
7 #24^&--查询包涵 除数字字母外的 其他字符的字段
Select gonghao
FROM employee
Where not REGEXP_LIKE(gonghao, '^([a-z|0-9|A-Z]+)$') gonghao
--------------
1 afd*%12
2 #24^&
Select gonghao
FROM employee
Where not REGEXP_LIKE(gonghao, '^([a-z|0-9|A-Z|-]+)$')