在我的数据库中,用这些ASCII值插入了特殊字符
ASCII(' ') ASCII('')
49828 32
有ASCII值49828在列描述中显示为特殊字符¤
如何找到包含这个特殊字符的所有值?以及如何用常规空格(ASCII 32)替换
我认为你会使用REPLACE
(正如你所说的)。
样本表:
SQL> create table test (col) as
2 select 'x' || chr(67) || 'y' from dual union all
3 select 'x' || chr(49828) || 'y' from dual;
Table created.
内容(忽略my中显示的Ą
)SQL * +,我的数据库):
SQL> select * from test;
COL
----
xCy
xĄy
仅更新包含该值的行:
SQL> update test set
2 col = replace(col, chr(49828), chr(32))
3 where instr(col, chr(49828)) > 0;
1 row updated.
结果:
SQL> select * from test;
COL
----
xCy
x y
SQL>