update test_t a set a.testname=replace(a.testname,'张三','李四') where 条件;
注意:没有条件的话,就是全表更新,把条件去掉就行.
追问:
如果有两个张三呢?我只要替换第二个张三,怎么弄啊?
回答update test_t a set a.testname=regexp_replace(a.testname,'张三','李四',1,2);要10G以上的ORACLE。
update test_t a set a.testname=replace(a.testname,'张三','李四') where 条件;
注意:没有条件的话,就是全表更新,把条件去掉就行.
追问:
如果有两个张三呢?我只要替换第二个张三,怎么弄啊?
回答update test_t a set a.testname=regexp_replace(a.testname,'张三','李四',1,2);要10G以上的ORACLE。