Was this helpful?
Character Data Type
Character strings are fixed‑length strings that can contain any printing or non‑printing character, and the null character ('\0'). For example, if you enter ABC into a character(5) column, five bytes will be stored, as follows:
'ABC  '
Leading and embedded blanks are significant when comparing character strings. For example, OpenSQL considers the following character strings to be different:
'A B C'
'ABC'
When selecting character strings using the underscore ( _ ) wildcard character of the like predicate, any trailing blanks you want to match must be included. For example, to select the following character string:
'ABC '
the wildcard specification must also contain trailing blanks:
'___  '
Length is not significant when comparing character strings. The shorter string is (logically) padded to the length of the longer. For example, OpenSQL considers the following character strings equal:
'ABC'
'ABC '
Char is a synonym for character.
Last modified date: 08/28/2024