看不见图,char 最大长度是2000.SQL> create table test (v2 char(2001)); create table test (c char(2001)) * ERROR at line 1: ORA-00910: specified length too long for its datatype SQL> create table test1 (c char(2000)); Table created. nvarchar2(2000) 不区别汉字和字母 varchar2(4000) 只能存储2000 个汉字
看不见图,char 最大长度是2000.SQL> create table test (v2 char(2001));
create table test (c char(2001))
*
ERROR at line 1:
ORA-00910: specified length too long for its datatype
SQL> create table test1 (c char(2000));
Table created.
nvarchar2(2000) 不区别汉字和字母
varchar2(4000) 只能存储2000 个汉字
nvarchar2最大2000
varchar2 最大4000
------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716
char(maximum_length)
其中,参数maximum_length用于指定最大长度(以字节为单位),可指定的最大值为32767,缺省值为1.注意,不能使用常量或变量来指定该值,只能使用1到32767之间的整数.
如果char(n)类型的变量用于存储多字节字符,则它的最大长度小于n个字符.如果数据不满n个字符,则末尾用空格填充.数据库char类型列的最大长度为2000个字节,所以不能把长度大于2000的char类型的值插入到数据库列中。但是可以插入到类型为varchar2或long的列表中.