ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 判断字段中是否有汉字

判断字段中是否有汉字

原创 Linux操作系统 作者:zhouwf0726 时间:2019-02-22 14:00:05 0 删除 编辑

SQL> create table test(id varchar2(60));

Table created

SQL> insert into test values('张abc');

1 row inserted

SQL> insert into test values('abc');

1 row inserted

SQL> insert into test values('张');

1 row inserted

SQL> commit;

SQL> select id from test where asciistr(id) like '%%';

ID
------------------------------------------------------------
张abc
张

SQL> select * from test where length(id)!=lengthb(id);

ID
------------------------------------------------------------
张abc
张


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/756652/viewspace-242170/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2006-02-22

  • 博文量
    458
  • 访问量
    416581