ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 判断字段中是否包含中文的方法(转)

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

原创 Linux操作系统 作者:lottery009 时间:2019-03-12 14:39:06 0 删除 编辑
判断字段中是否包含中文的方法(转)

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

select legth(column_name) , lengthb(column_name) from table_name
where length(column_name) != lengthb(column_name) ;

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

上一篇: 搞懂oracle字符集
请登录后发表评论 登录
全部评论

注册时间:2005-10-18

  • 博文量
    34
  • 访问量
    30313