2017-05-08 55 views

回答

0

試試這個

select col1,col2,...., case when colN ='TÜRKEI' then 'TR' else colN end as colN 
from your_table 
0

假設列名col,你

您可以使用SQL標準case

select t.*, case when col = 'TÜRKEI' then 'TR' else col end as col_new 
from your_table t; 

或Oracle特定decode

select t.*, decode(col, 'TÜRKEI', 'TR', col) as col_new 
from your_table t; 

如果你想用值來更新表,你可以簡單的更新

update your_table 
set col = 'TR' 
where col = 'TÜRKEI'; 
0

如果你想改變數據庫中的值,那麼你必須使用更新聲明。 SQL UPDATE語句用於更新現有記錄在表中。

e.g

update tablename 
set column1 = value 
where condition;