0 votes
in Oracle by
How will you differentiate between Varchar & Varchar2?

2 Answers

0 votes
by

Both Varchar & Varchar2 are the Oracle data types which are used to store character strings of variable length. To point out the major differences between these,

VarcharVarchar2

Can store characters up to 2000 bytes

Can store characters up to 4000 bytes.

It will hold the space for characters defined during declaration even if all of them are not used

It will release the unused space

0 votes
by

Both VARCHAR and VARCHAR2 are used to store variable-length character strings. VARCHAR is a standard SQL data type which works across different relational database systems. Whereas, VARCHAR2 is specific to Oracle.

VARCHAR 2 has several advantages. It is more storage efficient and, unlike VARCHAR, it does not store trailing spaces at the end of a string so avoids potential unexpected results when comparing strings. However,  VARCHAR2 might not be supported non-Oracle database systems.

Related questions

0 votes
asked Dec 20, 2020 in SVN by SakshiSharma
0 votes
asked Mar 26, 2023 in Oracle by Robin
...