网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

sql 语句 急!!!! 数据将英文和数字去掉,只保留汉字的sql语句

时间:2024-10-13 15:58:27

1、创建测试表,

create table test_replace_str(value varchar2(200));

sql 语句 急!!!! 数据将英文和数字去掉,只保留汉字的sql语句

2、插入测试数据;

insert into test_replace_str values('abc12历史');

insert into test_replace_str values('ABC3试试dc');

insert into test_replace_str values('ZZZ11100');

commit;

sql 语句 急!!!! 数据将英文和数字去掉,只保留汉字的sql语句

3、查询表中全量数据;select t.*, rowid from test_replace_str t;

sql 语句 急!!!! 数据将英文和数字去掉,只保留汉字的sql语句

4、编写语句,将英文和数字去掉,只保留汉字;

select t.*, regexp_replace(value, '[a-zA-Z0-9]', '') sec

from test_replace_str t;

© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com