Multiple choice technology databases

Which of the following describes the difference between varchar and varchar2 data types

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

  2. varchar data type is not supported in oracle

  3. varchar data type is applicable only to PL/SQL

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

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In Oracle, VARCHAR max length is 2000 bytes while VARCHAR2 max is 4000 bytes. VARCHAR is included only for backward compatibility and should not be used for new code. Both types work in SQL and PL/SQL, and both store variable-length character data.