首页 > 开发 > 综合 > 正文

判断字段中是否包含中文的方法

2024-07-21 02:38:00
字体:
来源:转载
供稿:网友

  SQL> create table test(a varchar2(10));
  
  Table created.
  
  SQL> insert into test values('鸟');
  
  1 row created.
  
  SQL> commit;
  
  Commit complete.
  
  SQL> insert into test values('深刻');
  
  1 row created.
  
  SQL> commit;
  
  Commit complete.
  
  SQL> insert into test values('aaa');
  
  1 row created.
  
  SQL> insert into test values('bbb');
  
  1 row created.
  
  SQL> commit;
  
  Commit complete.
  
  SQL> select a from test;
  A
  ----------
  鸟
  深刻
  aaa
  bbb
  
  SQL> select a from test where asciistr(a) like '%/%';
  A
  ----------
  鸟
  深刻
  
  SQL> select a from test where asciistr(a) not like '%/%';
  A
  ----------
  aaa
  bbb

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表