The varchar2 data type stores variable-length character strings and is currently synonymous with the varchar data type. However, in a future version of Oracle, varchar might store variable-length character strings compared with different comparison semantics. Currently there are two types of comparison semantics for strings in Oracle: blank-padded comparison semantics and non-padded comparison semantics. When blank-padded comparison semantics is used, if the two values have different lengths, Oracle first adds blanks to the end of the shorter one so their lengths are equal. Oracle then compares the values character by character up to the first character that differs. The value with the greater character in the first differing position is considered greater. If two values have no differing characters, then they are considered equal. This rule means that two values are equal if they differ only in the number of trailing blanks. Oracle uses blank-padded comparison semantics only when both values in the comparison are either expressions of data type char, text literals, or values returned by the user-defined function. In the case of non-padded comparison semantics two values are compared character by character up to the first character that differs. The value with the greater character in that position is considered greater. If two values of different length are identical up to the end of the shorter one, the longer value is considered greater. If two values of equal length have no differing characters, then the values are considered equal. Oracle uses non-padded comparison semantics when one or both values in the comparison have the data type varchar or varchar2.