What is the difference between varchar and varchar2 in Oracle?
Solution 1:
As for now, they are synonyms.
VARCHAR
is reserved by Oracle
to support distinction between NULL
and empty string in future, as ANSI
standard prescribes.
VARCHAR2
does not distinguish between a NULL
and empty string, and never will.
If you rely on empty string and NULL
being the same thing, you should use VARCHAR2
.
Solution 2:
Currently VARCHAR behaves exactly the same as VARCHAR2. However, the type VARCHAR
should not be used as it is reserved for future usage.
Taken from: Difference Between CHAR, VARCHAR, VARCHAR2