Chinaunix首页 | 论坛 | 博客
  • 博客访问: 91764641
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-03-31 16:40:36

来源:赛迪网    作者:Alice

本文中length代表的是字的长度,lengthb是字节的长度,字符集为UTF8。

SQL> create table test(a varchar2(20));

Table created

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

1 row inserted

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

1 row inserted

SQL> insert into test values('玲珑剔透');

1 row inserted

SQL> commit;

Commit complete

SQL> select * from test;

A
--------------------
2
12
玲珑剔透

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

A
--------------------
玲珑剔透

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

A
--------------------
2
12

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

A
--------------------
玲珑剔透
阅读(405) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~