Data type: Character

The character data type is a primitive data type represented by the number 2 in the database. A character data type is typically expressed as a character string. A character string has the following characteristics:

  • It must be enclosed in double quotation marks.
  • It can be any combination of letters, digits spaces, or special characters.
  • It can contain any special characters including those used as operators.
  • It can contain a double quotation mark, but it must be preceded by a backslash (\) to enable the system to distinguish between double quotation marks as part of the string and a double quote at the beginning or end of the string. For example,"Vendor=\"473\"" denotes the string: Vendor="473".
  • It can contain non-characters, such as two hexadecimal digits preceded by a backslash.
  • It can treat any special or reserved character as a literal character by preceding it with a backslash.
  • It can present a literal backslash (\) by containing a double backslash (\\).
  • It can be any length, including zero.
  • An empty (for example, length of zero) character string is not the same as a character string with a NULL value.

The following table presents some examples.

Description Literal examples
Alphabetic "abcde"
Numeric "12379"
Alphanumeric "a1276b45"
Special "$%=+*#@/"
Mixed "$vendor"
Mixed "$12379@6:54"
Mixed "A1276%#B"
Hexadecimal "\01\ff\c2"
Containing backslash "C:\\Program Files\\Micro Focus\\Service Manager 9.34\\Server\\RUN\\sm.ini"
Containing double quote "Enter the \"uid\" in the Unique ID field"