varchar2(10 byte)和varchar2(10 char)有什么不同
2013-03-26 10:59
411 查看
The VARCHAR2 datatype specifies a variable-length character string. When you create a VARCHAR2 column, you supply the maximum number of bytes or characters of data that it can hold. Oracle subsequently stores each value in the column exactly as you specify
it, provided the value does not exceed the column's maximum length of the column. If you try to insert a value that exceeds the specified length, then Oracle returns an error.
You must specify a maximum length for a VARCHAR2 column. This maximum must be at least 1 byte, although the actual string stored is permitted to be a zero-length string (''). You can use the CHAR qualifier, for example VARCHAR2(10 CHAR), to give the maximum
length in characters instead of bytes. A character is technically a code point of the database character set. CHAR and BYTE qualifiers override the setting of the NLS_LENGTH_SEMANTICS parameter, which has a default of bytes. For performance reasons, Oracle
recommends that you use the NLS_LENGTH_SEMANTICS parameter to set length semantics and that you use the BYTE and CHAR qualifiers only when necessary to override the parameter. The maximum length of VARCHAR2 data is 4000 bytes. Oracle compares VARCHAR2 values
using nonpadded comparison semantics.
转自:http://blog.csdn.net/haydenwang8287/article/details/3899954
it, provided the value does not exceed the column's maximum length of the column. If you try to insert a value that exceeds the specified length, then Oracle returns an error.
You must specify a maximum length for a VARCHAR2 column. This maximum must be at least 1 byte, although the actual string stored is permitted to be a zero-length string (''). You can use the CHAR qualifier, for example VARCHAR2(10 CHAR), to give the maximum
length in characters instead of bytes. A character is technically a code point of the database character set. CHAR and BYTE qualifiers override the setting of the NLS_LENGTH_SEMANTICS parameter, which has a default of bytes. For performance reasons, Oracle
recommends that you use the NLS_LENGTH_SEMANTICS parameter to set length semantics and that you use the BYTE and CHAR qualifiers only when necessary to override the parameter. The maximum length of VARCHAR2 data is 4000 bytes. Oracle compares VARCHAR2 values
using nonpadded comparison semantics.
转自:http://blog.csdn.net/haydenwang8287/article/details/3899954
相关文章推荐
- varchar2(10 byte)和varchar2(10 char)有什么不同
- char varchar varchar2(byte) varchar(char) nvarchar2()有何不同?
- mysql的varchar(20)和oracle的varchar2(20)有什么不同?
- char(10)和VARCHAR(10)主要的区别是什么?
- char(10)和VARCHAR(10)主要的区别是什么?
- char(10)和VARCHAR(10)主要的区别是什么?
- 将所有varchar2字段中byte类型修改成varchar2的char类型
- char varchar varchar2(byte) varchar(char) nvarchar2()有何不同?
- char(10)和VARCHAR(10)主要的区别是什么?
- char varchar nchar nvarchar 四者的区别是什么(为何SQL Server自动给字符串末尾加空格)
- char varchar nchar nvarchar 四者的区别是什么(为何SQL Server自动给字符串末尾加空格)
- oracle中 char,varchar,varchar2的区别
- Oracle里Varchar的参数(byte和char)的区别测试
- varchar(10)与nvarchar(10)有什么区别
- oracle中 char,varchar,varchar2的区别
- orale--varchar2(5) vs varchar2(5 byte) vs varchar2(5 char)
- varchar2的参数(byte和char)区别
- char、varchar和varchar2的区别
- char varchar nchar nvarchar 四者的区别是什么(为何SQL Server自动给字符串末尾加空格)
- mysql中int(10)和char(10)以及varchar(10)的区别