解决方案 »
- 帮看看这语句怎么不行呢?
- 求助,比较急!
- oracle里面的存储过程和函数加密之后可以解密吗?
- 在存储过程中,下面的替换语句,在oracle中是怎么样的?
- 一个数据库中50个表,能否用sql查询出那些表中含有dw的字段
- 关于数据库同步的问题,急!
- sql2000到oracle9I的错误提示,怎么解决?
- 如何创建表空间?????给100分
- 安装oracle9i run ./runInstaller,Initializing Java Virtual Machine from..怎么就没反应了???
- 关于oracle序列的问题
- ORA-12154: TNS:could not resolve the connect idendifier specified
- 触发器问题
with tmp as
(
select '[email protected]' email from dual union all
select '[email protected]' email from dual union all
select '[email protected]' email from dual
)
select regexp_replace(email, '(\w+)@(\w+\.)+\w{2,3}', '\1') result
from tmp;RESULT
-------zb
test
absss
with tmp as
(
select '[email protected]' email from dual union all
select '[email protected]' email from dual union all
select '[email protected]' email from dual
)
select regexp_replace(email, '(\w+)@(\w+\.)+\w{2,3}', '\1') result
from tmp;RESULT
--------------
zb
test
absss
如果,说是表中有一列数据都是@163.com结尾的情况下,我想在写sql语句的时候可不可以将当前的着一列数据信息截取呢!!
比如:
select id from ty_nc_tw_mapping a where a.regexp_replace(email, '(\w+)@(\w+\.)+\w{2,3}', '\1') ='zb'是否可以呢
(
select '[email protected]' email from dual union all
select '[email protected]' email from dual union all
select '[email protected]' email from dual union all
select '[email protected]' email from dual
)
select email
from tmp
where regexp_replace(email, '(\w+)@(\w+\.)+\w{2,3}', '\1') = 'zb';EMAIL
---------------------
[email protected]