Oracle CHAR and VARCHAR2 data types
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
The VARCHAR2 data type does not
pad data with trailing spaces. However, Oracle CHAR does
pad with trailing spaces. For example, in a CHAR column
20 characters wide, the entry MA includes the two characters
and 18 spaces. Your application will find the entry only if a WHERE clause
searches for the string that includes MA and the
18 spaces. If the column is a VARCHAR2 column,
your application will find the entry if it searches for the two
characters. The VARCHAR2 data type is more consistent
with the OpenEdge CHARACTER data type.