Character data types
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Character data types
Character data strings consist of a sequence of character from a defined character set, such as ASCII. A character string may have a fixed or varying length.
Syntax
This is the syntax for character data types:
|
Parameters
- CHARACTER [ ( length ) ]
-
CHARACTER(aliasCHAR) corresponds to a null‑terminated character string with the length specified. Values are padded with blanks to the specified length. The default length is 1. The maximum length is 2,000 characters.The OpenEdge SQL representation is a variable‑length string. The host language representation is equivalent to a C language character string.
- { CHARACTER VARYING | CHAR VARYING | VARCHAR | CLOB | LVARCHAR }[ ( length ) ]
-
CHARACTER VARYING, CHAR VARYING,andVARCHARcorresponds to a variable‑length character string with the maximum length specified. The default length is 1 character. The maximum length is 31,995 characters.CLOBhas a maximum length of 1,073,741,823. ACLOBis an object of data typeCLOB.
Notes
- For
data types
CHARACTER(length) andVARCHAR(length) the value oflengthspecifies the number of characters. - The maximum length can be as large as 31,995. The sum of all the column lengths of a table row must not exceed 31,960.
- Due to index size limitations, only the narrower
VARCHARcolumns can be indexed.