本文中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
--------------------
玲珑剔透
|
上一篇: 巧用"rman"的TSPITR技术找回删除的表
下一篇: Oracle特殊包和"DBMS_Job"包的使用方法