VARCHAR(n)
fields with VARCHAR2(n)
fields(提供n <= 4000). 为什么Oracle像其他DBMS一样调用此数据类型VARCHAR2而不仅仅是VARCHAR?
Do not use the VARCHAR data type. Use
the VARCHAR2 data type instead.
Although the VARCHAR data type is
currently synonymous with VARCHAR2,
the VARCHAR data type is scheduled to
be redefined as a separate data type
used for variable-length character
strings compared with different
comparison semantics.
PL/SQL User’s Guide and Reference 10g Release 2就是这样说的:
Currently,VARCHAR is synonymous with
VARCHAR2. However,in future releases
of PL/sql,to accommodate emerging sql
standards,VARCHAR might become a
separate datatype with different
comparison semantics. It is a good
idea to use VARCHAR2 rather than
VARCHAR.
Database Concepts 10g Release 2文件用更强的术语说同样的话:
The VARCHAR datatype is synonymous
with the VARCHAR2 datatype. To avoid
possible changes in behavior,always
use the VARCHAR2 datatype to store
variable-length character strings.
Oracle 9.2和8.1.7文档说的基本相同,所以即使Oracle不断阻止使用VARCHAR,到目前为止他们还没有采取任何措施来改变它与VARCHAR2的奇偶校验.