【引】http://hi.baidu.com/zzuhpc/blog/item/b3c5c138f08ebcf53a87cec8.html
1.char
2.varchar/varchar2
3.nvarchar/nvarchar2
orcale 中varchar2 和nvarchar2的區別
在sql ref書中介紹到
1 VARCHAR2(size)
[BYTE | CHAR]
Variable-length character string having maximum
length size bytes or characters. Maximum size is
4000 bytes, and minimum is 1 byte or 1 character.
You must specify size for VARCHAR2.
BYTE indicates that the column will have byte
length semantics; CHAR indicates that the column
will have character semantics.
1 NVARCHAR2(size) Variable-length character string having maximum
length size characters or bytes, depending on the
choice of national character set. Maximum size is
determined by the number of bytes required to store
each character, with an upper limit of 4000 bytes.
You must specify size for NVARCHAR2.
中文大意:
VARCHAR2(size),可變長度的字符串,其最大長度為 size 個字節。size 的最大值是 4000,而最小值是 1。您必須指定一個 VARCHAR2 的 size。
NVARCHAR2(size),可變長度的字符串,依據所選的國家字符集,其最大長度為 size 個字符或字節。size 的最大值取決于存儲每個字符所需要的字節數,其上限為 4000 個字節。您必須為 NVARCHAR2 指定一個 size。
相同點:都是可變長度字符串(char類型是不變長度),都必須指定大小
不同點:VARCHAR2存放的英文字符只占一個字節,而nvarchar2依據所選的字符集,大多為兩個