Try OpenEdge Now
skip to main content
DataServer for Oracle
Initial Programming Considerations : Data types : Oracle CHAR and VARCHAR2 data types
 

Oracle CHAR and VARCHAR2 data types

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.