1. 程式人生 > >varchar2與varchar區別

varchar2與varchar區別

2: varchar2
VARCHAR2 Datatype
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. 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.
3: varchar
VARCHAR Datatype
The VARCHAR datatype is currently synonymous with the VARCHAR2 datatype.
Oracle recommends that you use VARCHAR2 rather than VARCHAR. In the future,
VARCHAR might be defined as a separate datatype used for variable-length character strings compared with different comparison semantics.