--字符串类型char
EODA@PROD1> create table t
2 ( a varchar2(1), --一个字节
3 b varchar2(1 char), --一个字符
4 )
5 /
Table created.
EODA@PROD1>
EODA@PROD1> insert into t (a) values (unistr('\00d6')); --插入一个字符失败
insert into t (a) values (unistr('\00d6'))
*
ERROR at line 1:
ORA-12899: value too large for column "EODA"."T"."A" (actual: 2, maximum: 1)
EODA@PROD1> insert into t (b) values (unistr('\00d6')); --插入一个字符成功
1 row created.
EODA@PROD1> select length(b), lengthb(b), dump(b) dump from t;
LENGTH(B) LENGTHB(B)
---------- ----------
DUMP
----------------------------------------------------------------------------------------------------
1 2
Typ=1 Len=2: 195,150
字符串类型char
最新推荐文章于 2022-04-29 09:56:17 发布