with example_data as (
select 'leena' field0 from dual union all
select 'stev' field0 from dual union all
select 'neene' field0 from dual union all
select 'ajay' field0 from dual union all
select 'vine' field0 from dual
)
select
field0,
decode( instr(field0,'e'),
0, field0,
substr(field0,1,instr(field0,'e')-1) || 's' || substr(field0,instr(field0,'e')+1))
from
example_data
3条答案
按热度按时间7kqas0il1#
试试这个:
字符串
regexp_replace函数的解释如下:http://www.java2s.com/Book/Oracle/String_Functions/REGEXP_REPLACE_function.htm
sqyvllje2#
另一个变体,不像
regexp_replace
那么优雅,但也可以工作:字符串
SQLFiddle
只是为了说明。
tyu7yeag3#
字符串
最简单的解决方案之一:
型