0 votes
How will you differentiate between Varchar & Varchar2?
in Oracle by sheetal-cs-28

2 Answers

0 votes

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

by sheetal-cs-28
0 votes

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.

by
...