如何replaceOracle数据库列中的特定值?
我正在寻找replace特定列中的值。 例如以下列值
column name ---------- Test1 Test2 Test3 Test12  应该(用est1replacerest1 ) 
 column name ---------- Trest1 Test2 Test3 Trest12 
	
使用REPLACE :
 SELECT REPLACE(t.column, 'est1', 'rest1') FROM MY_TABLE t 
如果要更新表中的值,请使用:
 UPDATE MY_TABLE t SET column = REPLACE(t.column, 'est1', 'rest1') 
如果您需要更新特定表中的值:
 UPDATE TABLE-NAME SET COLUMN-NAME = REPLACE(TABLE-NAME.COLUMN-NAME, 'STRING-TO-REPLACE', 'REPLACEMENT-STRING'); 
哪里
  TABLE-NAME - The name of the table being updated COLUMN-NAME - The name of the column being updated STRING-TO-REPLACE - The value to replace REPLACEMENT-STRING - The replacement 
在Oracle中,有模式名称的概念,所以请尝试使用它
 update schemname.tablename t set t.columnname = replace(t.columnname, t.oldvalue, t.newvalue); 
我正在使用版本4.0.2.15与Build 15.21
对我来说,我需要这个:
 UPDATE table_name SET column_name = REPLACE(column_name,"search str","replace str"); 
 将t.column_name放在t.column_name的第一个参数中不起作用。