Multiple choice technology databases

What is the difference between varchar and varchar2 data types?

  1. maximum length for varchar is 2000 bytes and for varchar2 is 4000 bytes

  2. varchar is used to store fixed length character data, varchar2 is for variable length character data

  3. varchar data type is not supported in oracle

  4. varchar is applicable only to PL/SQL

Reveal answer Fill a bubble to check yourself
D Correct answer
AI explanation

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.