update a set b = replace(b, '23456,', '') where instr(b, '23456,')>0
这是clob字段,这样可以吗?
update a set b = replace(b, '23456,', '') where instr(b, '23456,',1,1)>0
DBMS_LOB包里有instr,但是没有replace,如果要repace需要自己写。
-- Create table create table A ( B CLOB ); insert into a values('12345,23456,.... '); commit; select * from a where instr(b, '23456,')>0; update a set b = replace(b, '23456,', '') where instr(b, '23456,')>0
试过了,update不起作用,呵呵!
如果10G 可以考虑用正则表达式!REG_LIKE!
这样行不行?update a set b =substr(b,0,instr(b, '23456,'))||substr(b,6+instr(b, '23456,')) where instr(b, '23456,')>0
这是clob字段,这样可以吗?
DBMS_LOB包里有instr,但是没有replace,如果要repace需要自己写。
create table A
(
B CLOB
);
insert into a values('12345,23456,.... ');
commit;
select * from a where instr(b, '23456,')>0;
update a set b = replace(b, '23456,', '') where instr(b, '23456,')>0
where instr(b, '23456,')>0