Was this helpful?
Varchar Data Type
Varchar strings are variable‑length strings, returned to applications as a 2‑byte length specifier followed by character data. The varchar data type can contain any character, including non‑printing characters and the ASCII null character ('\0').
Blanks are significant in the varchar data type. For example, OpenSQL does not consider the following two varchar strings equal:
'the store is closed'
and
'thestoreisclosed'
If the strings being compared are unequal in length, the shorter string is padded with trailing blanks until it equals the length of the longer string.
For example, the following two varchar strings:
'abcde' and 'abcd'
are compared as
'abcde' and  'abcd '
Last modified date: 08/14/2024