Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Language Elements : Data types : Character data types
 
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:
{ CHARACTER | CHAR }[ ( length ) ]|
{ CHARACTER VARYING | CHAR VARYING | VARCHAR | LVARCHAR | CLOB }[ ( length ) ]

Parameters

CHARACTER [ ( length ) ]
CHARACTER (alias CHAR) 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, and VARCHAR corresponds 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. A CLOB is an object of data type CLOB.

Notes

*For data types CHARACTER( length ) and VARCHAR( length ) the value of length specifies 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 VARCHAR columns can be indexed.
* Maximum length for VARCHAR
* National Language Support (NLS)
* Concatenation operator