What is the difference between varchar and varchar2 data types?
-
maximum length for varchar is 2000 bytes and for varchar2 is 4000 bytes
-
varchar is used to store fixed length character data, varchar2 is for variable length character data
-
varchar data type is not supported in oracle
-
varchar is applicable only to PL/SQL
In practice VARCHAR and VARCHAR2 behave identically in current Oracle, but Oracle has historically reserved plain VARCHAR for use inside PL/SQL declarations and recommends VARCHAR2 for actual table columns, since Oracle warns it may redefine VARCHAR's semantics (e.g., blank-padded comparisons) in a future release. That's why VARCHAR2 — not VARCHAR — is the datatype meant for general SQL column storage, and the size-limit and fixed-vs-variable-length claims in the other options don't hold up.