CHAR(N) with N<= 254 bytes
VARCHAR(N) with N <= 32672 bytes
GRAPHIC(N) with N <= 127 characters
VARGRAPHIC(N) with N <=16336 characters
IBM DB2 uses Byte Length Semantics to define the length of CHAR/VARCHAR columns.
However, GRAPHIC and VARGRAPHIC lengths are specified in characters (i.e. max number of double-byte characters).
The character set used by DB2 to store CHAR and VARCHAR data is defined in the database locale section when creating a new database with the DB2 Control Center.
DB2 can automatically convert from/to the client and server characters sets. In the client applications, you define the character set with the DB2CODEPAGE profile variable.
Syntax GRAPHIC[(n)]
Data Fixed-length double-byte character data
Parameters n is the maximum number of characters, optional
Range 1-127
Default n is 1
Padding Right-padded with spaces to n
Empty String '' is treated as empty string
Storage Size n*2 bytes