What is the difference between varchar and varchar2 in Oracle?

hrishi picture hrishi · Jul 23, 2009 · Viewed 293.5k times · Source

What is the difference between varchar and varchar2?

Answer

Quassnoi picture Quassnoi · Jul 23, 2009

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.